-
Notifications
You must be signed in to change notification settings - Fork 59
ci: add comprehensive configuration for renovate dependency automation #2777
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
Merged
+157
−68
Merged
Changes from all commits
Commits
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,148 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": ["group:monorepos"], | ||
| "dependencyDashboard": true, | ||
| "rangeStrategy": "replace", | ||
|
|
||
| // Schedule Renovate to run during off-peak hours | ||
| "schedule": [ | ||
| "after 10:00pm every weekday", | ||
| "before 5:00am every weekday", | ||
| "every weekend" | ||
| ], | ||
| "prConcurrentLimit": 8, | ||
| "prHourlyLimit": 4, | ||
| "timezone": "America/Tijuana", | ||
|
|
||
| // Commit and PR customization | ||
| "commitBody": "See associated pull request for more information.", | ||
| "semanticCommits": "enabled", | ||
| "semanticCommitScope": "", | ||
| "semanticCommitType": "build", | ||
| "labels": ["area: build & ci", "action: review"], | ||
|
|
||
| "lockFileMaintenance": { | ||
| "enabled": true | ||
| }, | ||
|
|
||
| // Ignored dependencies in all repositories | ||
| "ignoreDeps": [ | ||
| "build_bazel_rules_nodejs", | ||
| "rules_pkg" | ||
| ], | ||
|
|
||
| "packageRules": [ | ||
| // ============================================================================ | ||
| // GENERAL GROUPING & UPDATE BEHAVIOR | ||
| // ============================================================================ | ||
|
|
||
| // Group all non-major updates (minor and patch) together | ||
| { | ||
| "groupName": "all non-major dependencies", | ||
| "matchPackageNames": [ | ||
| "*", | ||
| "!node", | ||
| "!pnpm", | ||
| "!npm", | ||
| "!yarn" | ||
| ], | ||
| "matchUpdateTypes": ["digest", "patch", "minor"] | ||
| }, | ||
|
|
||
| // ============================================================================ | ||
| // ECOSYSTEM-SPECIFIC GROUPING | ||
| // ============================================================================ | ||
|
|
||
| // Group Bazel updates | ||
| { | ||
| "groupName": "bazel dependencies", | ||
| "matchManagers": ["bazel"] | ||
| }, | ||
|
|
||
| // ============================================================================ | ||
| // DEPENDENCY-SPECIFIC UPDATE CONTROLS | ||
| // ============================================================================ | ||
|
|
||
| // Group updates related to Angular ecosystem across repositories | ||
| { | ||
| "groupName": "cross-repo angular dependencies", | ||
| "followTag": "next", | ||
| "separateMajorMinor": false, | ||
| "schedule": ["at any time"], | ||
| "matchPackageNames": [ | ||
| "@angular-devkit/**", | ||
| "@angular/**", | ||
| "@schematics/**", | ||
| "angular/**", | ||
| "ng-packagr" | ||
| ] | ||
| }, | ||
|
|
||
| // Disable 'next' tag tracking on non-main branches | ||
| { | ||
| "matchBaseBranches": ["!main"], | ||
| "followTag": null | ||
| }, | ||
|
|
||
| // Keep minor and patch updates separate for TypeScript | ||
| { | ||
| "matchPackageNames": ["typescript"], | ||
| "separateMinorPatch": true | ||
| }, | ||
|
|
||
| // Group TypeScript-related packages | ||
| { | ||
| "groupName": "typescript dependencies", | ||
| "matchPackageNames": ["typescript", "tslib"] | ||
| }, | ||
|
|
||
| // Limit how many times these packages get updated (They deploy each merged PR) | ||
| { | ||
| "matchPackageNames": ["renovate", "quicktype-core"], | ||
| "schedule": ["on sunday and wednesday"] | ||
| }, | ||
|
|
||
| // ============================================================================ | ||
| // WORKFLOW-SPECIFIC UPDATE RULES | ||
| // ============================================================================ | ||
|
|
||
| // Group dependencies in the scorecard GitHub Actions workflow | ||
| { | ||
| "groupName": "scorecard action dependencies", | ||
| "matchFileNames": [".github/workflows/scorecard.yml"], | ||
| "matchPackageNames": ["*"] | ||
| }, | ||
|
|
||
| // ============================================================================ | ||
| // EXCLUSION RULES | ||
| // ============================================================================ | ||
|
|
||
| // Disable updates for placeholder or 0.0.0-style versions | ||
| { | ||
| "enabled": false, | ||
| "matchCurrentVersion": "/^[~^]?0\\.0\\.0-/" | ||
| }, | ||
|
|
||
| // Disable major updates for specified dependencies | ||
| { | ||
| "enabled": false, | ||
| "matchPackageNames": [ | ||
| "@types/node", | ||
| "node", | ||
| "npm", | ||
| "pnpm", | ||
| "rxjs", | ||
| "tslib", | ||
| "yarn" | ||
| ], | ||
| "matchUpdateTypes": ["major"] | ||
| }, | ||
|
|
||
| // Disable TypeScript major and minor updates | ||
| { | ||
| "enabled": false, | ||
| "matchPackageNames": ["typescript"], | ||
| "matchUpdateTypes": ["major", "minor"] | ||
| } | ||
| ] | ||
| } |
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 |
|---|---|---|
| @@ -1,82 +1,23 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "semanticCommits": "enabled", | ||
| "semanticCommitType": "build", | ||
| "semanticCommitScope": "", | ||
| "dependencyDashboard": true, | ||
| "automerge": false, | ||
| "separateMajorMinor": false, | ||
| "timezone": "America/Tijuana", | ||
| "labels": ["comp: build", "renovate managed", "action: merge"], | ||
| "keepUpdatedLabel": "renovate managed", | ||
| "rebaseWhen": "conflicted", | ||
| "lockFileMaintenance": { | ||
| "enabled": true | ||
| }, | ||
| "ignorePaths": ["bazel/integration/tests/**"], | ||
| "ignoreDeps": ["rules_pkg", "@angular-devkit/build-angular"], | ||
| "baseBranches": ["main"], | ||
| "extends": ["github>angular/dev-infra//renovate-presets/default.json5"], | ||
|
|
||
| "postUpgradeTasks": { | ||
| "commands": [ | ||
| "git restore bazel/pnpm-lock.yaml", | ||
| "yarn install", | ||
| "git restore bazel/pnpm-lock.yaml .npmrc", | ||
| "yarn install --immutable", | ||
| "yarn bazel sync --only=repo || true", | ||
| "yarn update-generated-files" | ||
| ], | ||
| "executionMode": "update" | ||
| "executionMode": "branch" | ||
| }, | ||
|
|
||
| "ignorePaths": ["bazel/integration/tests/**"], | ||
| "packageRules": [ | ||
| { | ||
| "matchDepNames": ["node"], | ||
| "matchUpdateTypes": ["minor", "patch"] | ||
| }, | ||
| { | ||
| "enabled": false, | ||
| "matchDepNames": ["node"], | ||
| "matchUpdateTypes": ["major"] | ||
| }, | ||
| { | ||
| "matchUpdateTypes": ["minor", "patch"], | ||
| "groupName": "all non-major dependencies", | ||
| "schedule": ["at any time"], | ||
| "matchPackageNames": ["*"] | ||
| }, | ||
| { | ||
| "groupName": "bazel setup", | ||
| "matchPackageNames": ["/^@bazel/.*/", "/^build_bazel.*/"] | ||
| }, | ||
| { | ||
| "groupName": "yarn", | ||
| "matchPackageNames": ["/yarn.*/"] | ||
| }, | ||
| { | ||
| "groupName": "octokit dependencies", | ||
| "matchPackageNames": ["@octokit/{/,}**"] | ||
| }, | ||
| { | ||
| "followTag": "next", | ||
| "groupName": "angular dependencies", | ||
| "matchPackageNames": ["@angular/{/,}**", "@angular-devkit{/,}**", "@schematics/{/,}**"] | ||
| }, | ||
| { | ||
| "matchPackageNames": "renovate", | ||
| "schedule": ["after 10:00pm", "before 5:00am"] | ||
| }, | ||
| { | ||
| "enabled": true, | ||
| "matchPackageNames": ["typescript"], | ||
| "matchUpdateTypes": ["major"], | ||
| "enabled": false | ||
| }, | ||
| { | ||
| "matchPackageNames": ["@types/node"], | ||
| "matchUpdateTypes": ["major"], | ||
| "enabled": false | ||
| }, | ||
| { | ||
| "matchFileNames": [".github/workflows/scorecard.yml"], | ||
| "groupName": "scorecard action dependencies", | ||
| "groupSlug": "scorecard-action", | ||
| "matchPackageNames": ["*"] | ||
| "matchUpdateTypes": ["minor"] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unlike in other repos, it's fine to update TypeScript to a minor version in this one. |
||
| } | ||
| ] | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want the post upgrade to run for each dependency, but instead we want it to run for each branch. See: https://docs.renovatebot.com/configuration-options/#executionmode