-
Notifications
You must be signed in to change notification settings - Fork 0
63353 Dependabot improvements #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chihaiaalex
wants to merge
3
commits into
main
Choose a base branch
from
63353-dependabot-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,197 @@ | ||
| # Improve Dependabot Configuration | ||
|
|
||
| ## Context | ||
|
|
||
| The transitdata repositories currently have basic Dependabot configs (monthly schedule, no grouping, no cooldown, no Docker tracking). The goal is to reduce PR noise, gain supply-chain attack resilience via cooldown, and keep timely updates — applied consistently across all repos. | ||
|
|
||
| Default branch is `main` across all repos. Dependabot targets the default branch by default, so no `target-branch` override is needed. | ||
|
|
||
| ## Approach: Alternative 2 Grouping + Cooldown + Multi-Ecosystem | ||
|
|
||
| ### Grouping Strategy | ||
|
|
||
| For the primary package ecosystem (maven/gradle/npm/pip): | ||
| - **`dev-all`** group: all update types for development dependencies → one PR | ||
| - **`prod-minor-patch`** group: minor + patch for production dependencies → one PR | ||
| - **Major production deps**: ungrouped → individual PRs (require changelog review) | ||
|
|
||
| For infrastructure ecosystems (github-actions + docker): | ||
| - **`hsldevcom-infra`** group (multi-ecosystem): all updates for HSLdevcom-originating docker and github-actions packages combined into a single PR, using `patterns` to match only `hsldevcom/*` / `HSLdevcom/*` packages | ||
| - **Non-HSLdevcom packages**: grouped per-ecosystem for minor+patch, with majors ungrouped → individual PRs | ||
|
|
||
| ### Cooldown | ||
|
|
||
| Applied to all ecosystems: | ||
| ```yaml | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| ``` | ||
|
|
||
| `default-days: 30` serves as fallback for packages that don't follow semver (e.g., some Docker images). | ||
|
|
||
| **Security updates bypass cooldown** on the default branch. Per [GitHub docs](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown), cooldown does not delay security updates when PRs target the default branch. | ||
|
|
||
| ### Other Settings | ||
|
|
||
| - `open-pull-requests-limit: 20` on all ecosystem entries | ||
| - `schedule.interval: "daily"` — with auto-merge enabled, no extra delay is needed on top of cooldown | ||
|
|
||
| ## Template Configuration | ||
|
|
||
| A single unified template is used for all repos. Dependabot ignores ecosystems that don't apply to a given repo, so one template everywhere simplifies centralized management. | ||
|
|
||
| ```yaml | ||
| version: 2 | ||
| multi-ecosystem-groups: | ||
| hsldevcom-infra: | ||
| schedule: | ||
| interval: "daily" | ||
| updates: | ||
| - package-ecosystem: "docker" | ||
| directory: "/" | ||
| patterns: ["hsldevcom/*"] | ||
| multi-ecosystem-group: "hsldevcom-infra" | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| patterns: ["HSLdevcom/*"] | ||
| multi-ecosystem-group: "hsldevcom-infra" | ||
| updates: | ||
| - package-ecosystem: "maven" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| groups: | ||
| dev-all: | ||
| dependency-type: "development" | ||
| update-types: | ||
| - "major" | ||
| - "minor" | ||
| - "patch" | ||
| prod-minor-patch: | ||
| dependency-type: "production" | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| - package-ecosystem: "gradle" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| groups: | ||
| dev-all: | ||
| dependency-type: "development" | ||
| update-types: | ||
| - "major" | ||
| - "minor" | ||
| - "patch" | ||
| prod-minor-patch: | ||
| dependency-type: "production" | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| groups: | ||
| dev-all: | ||
| dependency-type: "development" | ||
| update-types: | ||
| - "major" | ||
| - "minor" | ||
| - "patch" | ||
| prod-minor-patch: | ||
| dependency-type: "production" | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| - package-ecosystem: "pip" | ||
chihaiaalex marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| groups: | ||
| dev-all: | ||
| dependency-type: "development" | ||
| update-types: | ||
| - "major" | ||
| - "minor" | ||
| - "patch" | ||
| prod-minor-patch: | ||
| dependency-type: "production" | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| - package-ecosystem: "docker" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| ignore: | ||
| - dependency-name: "eclipse-temurin/*" | ||
| # Ignore non-LTS versions; extend as the release schedule evolves | ||
| versions: ["26", "27", "28", "30", "31", "32", "34", "35", "36"] | ||
| groups: | ||
| docker-minor-patch: | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 20 | ||
| cooldown: | ||
| default-days: 30 | ||
| semver-major-days: 90 | ||
| semver-minor-days: 60 | ||
| semver-patch-days: 30 | ||
| groups: | ||
| actions-minor-patch: | ||
| update-types: | ||
| - "minor" | ||
| - "patch" | ||
| ``` | ||
|
|
||
| The `multi-ecosystem-groups` block groups HSLdevcom-originating docker and github-actions updates into a single PR, since new shared Dockerfile and shared workflow versions are often related. Non-HSLdevcom docker and github-actions updates are handled by their respective per-ecosystem groups (`docker-minor-patch`, `actions-minor-patch`) for minor+patch, with majors ungrouped as individual PRs. | ||
|
|
||
| ## Changes | ||
|
|
||
| ### Repos with existing dependabot.yml | ||
|
|
||
| Overwrite with the unified template above. This replaces any existing grouping, schedule, and ecosystem configuration. | ||
|
|
||
| ### Repos without dependabot.yml | ||
|
|
||
| Create a new `.github/dependabot.yml` using the unified template above. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.