Skip to content

Add dependabot.yml for dependency version updates#125

Open
kanwalpreetd wants to merge 3 commits intostellar:masterfrom
kanwalpreetd:dependabot_updates
Open

Add dependabot.yml for dependency version updates#125
kanwalpreetd wants to merge 3 commits intostellar:masterfrom
kanwalpreetd:dependabot_updates

Conversation

@kanwalpreetd
Copy link
Contributor

What

Adding base config for dependabot.yml, which enables automatic PRs for dependency version updates through Dependabot. This base config sets version updates to run on a weekly schedule, groups PRs for version updates according to major vs minor/patch updates, and sets max PRs that Dependabot can create for version updates per package-ecosystem.
But if you would like, several config options can be added to dependabot.yml as per configuration-options-for-the-dependabot.yml-file to customize version updates, such as:

  • Group PRs for version updates by different criteria
  • Set dependency-type option in allow option to all for enabling version updates for both direct and indirect dependencies (as well as prod and dev dependencies). By default, PRs for only updating direct prod+dev dependencies versions are created.
  • Set reviewers for Dependabot version updates PRs
  • Etc.

Also, automatic PRs for security updates through Dependabot are already enabled through a global setting. PRs for security updates will be grouped as much as possible across directories and per ecosystem through the global setting (grouping-dependabot-security-updates). But dependabot.yml can also be used for more granular security updates settings in addition to version updates (some of the options in dependabot.yml are shared across security and version updates), such as:

  • Grouping security updates according to custom criteria: overriding-the-default-behavior-with-a-configuration-file
  • Only allowing automatic PRs for security updates for certain dependencies by configuring allow directive to a certain value such as production, development, direct, indirect. By default, security updates are applied to all dependencies (direct, indirect, production, development).
  • Etc.

Why

To enable using the latest package versions, and provide a way to customize Dependabot security updates PRs.

Known limitations

N/A

Comment on lines 16 to 19
npm-major:
applies-to: version-updates
update-types:
- "major"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove major updates? These are typically significantly breaking and require manual intervention on most occasions so I prefer to evaluate them manually when releasing a new version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shaptic Done. Sorry, just came back to this.

@kanwalpreetd kanwalpreetd requested a review from Shaptic September 5, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants