Agent Wranglers

ENG-18Recommended

Update dependencies in small automatic steps

Let a bot open a pull request for each dependency update. Merge patch and minor updates when the checks pass, and have a person review each major update.

How to do it

Use a tool such as Renovate or Dependabot. Group small updates, and give major versions their own pull request. A major version may change behaviour that thin tests miss, so never merge one automatically. Wait at least 7 days before taking a new release, as the release cooldown rule explains. This rule keeps versions current. Finding known holes is a separate gate, as Lock and audit dependencies says, and the bill of materials follows Publish what is in each release.

Examples

YAML example

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: npm
    directory: /
    schedule: { interval: weekly }
    cooldown: { default-days: 7 }
    groups:
      minor-and-patch:
        update-types: [minor, patch]

How to check

No bot pull request stays open longer than 14 days. No dependency is more than one major version behind without a written reason. Every merged major update has an approval from a person, or in a team of one, a merge by a person instead of the bot.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/engineering/version-control-and-review/automated-dependency-updates">Agent Wranglers engineering playbook</a>. In code you write, add a comment next to it with the same link.