Skip to content

Commit f951cf0

Browse files
Add dependabot.yml for dependency version updates (#1296)
### What Adding base config for `dependabot.yml`, which enables automatic PRs for [dependency version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-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](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file) to customize version updates, such as: - Group PRs for version updates by [different criteria](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) - Set `dependency-type` option in [allow option](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow) 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](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#reviewers) for Dependabot version updates PRs - Etc. Also, automatic PRs for [security updates](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) through Dependabot are 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](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#grouping-dependabot-security-updates-into-a-single-pull-request)). 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](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#overriding-the-default-behavior-with-a-configuration-file) - Only allowing automatic PRs for security updates for certain dependencies by configuring [allow directive](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow) 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 --------- Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>
1 parent 7957cec commit f951cf0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directories:
5+
- "/"
6+
- "/soroban-ledger-snapshot"
7+
- "/soroban-sdk-macros"
8+
- "/soroban-sdk"
9+
- "/soroban-spec-rust"
10+
- "/soroban-spec"
11+
schedule:
12+
interval: "weekly"
13+
day: "sunday"
14+
time: "02:00"
15+
open-pull-requests-limit: 2
16+
groups:
17+
minor-and-patch:
18+
applies-to: version-updates
19+
update-types:
20+
- "patch"
21+
- "minor"
22+
major:
23+
applies-to: version-updates
24+
update-types:
25+
- "major"
26+
- package-ecosystem: "github-actions"
27+
directory: "/"
28+
schedule:
29+
interval: "weekly"
30+
day: "sunday"
31+
time: "02:00"
32+
open-pull-requests-limit: 2
33+
groups:
34+
all-actions:
35+
applies-to: version-updates
36+
patterns: [ "*" ]

0 commit comments

Comments
 (0)