Skills2026年4月16日·1 分钟阅读

Renovate — Automated Dependency Update Bot

Renovate keeps your dependencies fresh by automatically opening pull requests for updates across 90+ package managers, with fine-grained control over grouping, scheduling, and automerge.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Stage only
信任
信任等级:Established
入口
Renovate Overview
安全暂存命令
npx -y tokrepo@latest install 9b8e21a5-3942-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
Renovate scans repos for outdated dependencies and opens pull requests with version bumps automatically.
§01

What it is

Renovate is an open-source tool that automates dependency updates by scanning repositories for outdated packages and opening pull requests with the latest versions. Unlike simple bots, it supports 90+ package managers and gives you full control over grouping, scheduling, and automerge rules.

Renovate targets engineering teams that want to eliminate the manual work of keeping projects secure and up to date. It handles package.json, Dockerfile, Helm charts, Terraform modules, Go modules, and dozens more dependency formats.

§02

How it saves time or tokens

Manually checking for dependency updates, reading changelogs, and creating pull requests is time-consuming and error-prone. Renovate automates the entire cycle: scan for updates, generate changelogs, create PRs, and optionally automerge minor/patch updates when CI passes. Grouping related updates (e.g., all ESLint packages) into a single PR reduces review overhead. Rate limiting prevents PR floods that overwhelm reviewers.

§03

How to use

  1. Install the hosted Mend Renovate GitHub App (zero config):
# Visit github.com/apps/renovate and install on your repositories
# Renovate opens an onboarding PR with a default renovate.json config
  1. Or run Renovate locally via npx:
npx renovate --token $GITHUB_TOKEN --repositories your-org/your-repo
  1. Customize behavior with a renovate.json in your repository:
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["config:recommended"],
  "packageRules": [
    {
      "matchPackagePatterns": ["eslint"],
      "groupName": "eslint",
      "automerge": true
    }
  ],
  "schedule": ["before 7am on Monday"]
}
§04

Example

A comprehensive Renovate configuration for a production monorepo:

{
  "extends": ["config:recommended", ":automergeMinor"],
  "baseBranches": ["main"],
  "labels": ["dependencies"],
  "packageRules": [
    {
      "matchUpdateTypes": ["patch"],
      "automerge": true,
      "automergeType": "branch"
    },
    {
      "matchPackagePatterns": ["@types/*"],
      "groupName": "type-definitions",
      "automerge": true
    },
    {
      "matchManagers": ["dockerfile"],
      "groupName": "docker-images"
    }
  ],
  "prConcurrentLimit": 5,
  "schedule": ["after 10pm and before 5am every weekday"]
}
§05

Related on TokRepo

  • DevOps tools — More CI/CD and infrastructure automation tools on TokRepo.
  • Testing tools — Browse testing and validation tools for software projects.
§06

Common pitfalls

  • Not configuring grouping leads to dozens of individual PRs for related packages. Group packages by ecosystem (eslint, babel, testing) to reduce review load.
  • Enabling automerge without adequate CI coverage risks merging breaking changes. Ensure your test suite covers critical paths before turning on automerge.
  • Running Renovate without a schedule means PRs appear at random times. Set a schedule that aligns with your team's review workflow.

常见问题

How many package managers does Renovate support?+

Renovate supports 90+ package managers including npm, pip, Maven, Gradle, Go modules, Cargo, Helm, Terraform, Docker, NuGet, Composer, and Bundler. It discovers dependency files automatically in your repository.

What is the difference between Renovate and Dependabot?+

Renovate supports more package managers, offers more granular configuration (grouping, scheduling, automerge rules), and can be self-hosted. Dependabot is built into GitHub and simpler to set up but less configurable.

Can Renovate automerge updates?+

Yes. Configure automerge per package or update type. Renovate waits for CI to pass before merging. You can automerge patches automatically while requiring manual review for major version bumps.

Does Renovate work with GitLab and Bitbucket?+

Yes. Renovate supports GitHub, GitLab, Bitbucket, Azure DevOps, and Gitea. The hosted Mend Renovate app is GitHub-only, but the self-hosted version works with all platforms.

How do I prevent Renovate from creating too many PRs?+

Use prConcurrentLimit to cap the number of open PRs. Set a schedule to batch updates at convenient times. Group related packages to combine updates into fewer PRs.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产