Skip to content

Commit a312942

Browse files
committed
sadasd
1 parent 08ba421 commit a312942

File tree

3 files changed

+140
-70
lines changed

3 files changed

+140
-70
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Assistant to the Branch Manager
2+
3+
# Because the branch manager does not work for dev-infra, due to not using target branches, we don't
4+
# actually use any automatic triggers. Repository dispatch is included for our own testing use and
5+
# ensuring a valid config.
6+
on:
7+
repository_dispatch:
8+
# push:
9+
# pull_request_target:
10+
# types: [opened, synchronize, reopened, ready_for_review, labeled]
11+
12+
# Declare default permissions as read only.
13+
permissions: read-all
14+
15+
jobs:
16+
assistant_to_the_branch_manager:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v5.0.0
20+
with:
21+
# Setting persist-credentials instructs actions/checkout not to persist the credentials
22+
# in configuration or environment. Since we don't rely on the credentials used for
23+
# checkout this is an improved security measure.
24+
persist-credentials: false
25+
- uses: ./github-actions/branch-manager
26+
with:
27+
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}

package.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,25 @@
66
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
77
},
88
"dependencies": {
9-
"zone.js": "~0.12.4"
9+
"@angular/benchpress": "~0.3.0",
10+
"@octokit/auth-app": "^6",
11+
"@octokit/core": "^5",
12+
"@angular/core": "^20.0.0-rc",
13+
"@angular/common": "20.0.0-rc.1",
14+
"@types/jasmine": "~5.1.0",
15+
"quicktype-core": "23.1.0",
16+
"@types/node": "^12.11.1",
17+
"jasmine-core": "~3.8.0",
18+
"karma": "~6.3.0",
19+
"karma-chrome-launcher": "~3.1.0",
20+
"karma-coverage": "~2.0.3",
21+
"karma-jasmine": "~4.0.0",
22+
"karma-jasmine-html-reporter": "~2.1.0",
23+
"ng-packagr": "^20.0.0-rc",
24+
"rxjs": "~6.6.0",
25+
"tslib": "^2.3.0",
26+
"typescript": "~4.3.5",
27+
"zone.js": "~0.11.4"
1028
},
1129
"pnpm": {
1230
"onlyBuiltDependencies": []

renovate-preset/default.json5

Lines changed: 94 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,89 @@
11
{
2-
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3-
extends: ["group:monorepos"],
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['group:monorepos'],
44
dependencyDashboard: true,
5-
rangeStrategy: "replace",
5+
rangeStrategy: 'replace',
6+
automerge: false,
7+
8+
// Temporary workaround for https://github.com/renovatebot/renovate/discussions/30812
9+
ignoreScripts: false,
610

711
// Schedule Renovate to run during off-peak hours
8-
schedule: [
9-
"after 10:00pm every weekday",
10-
"before 5:00am every weekday",
11-
"every weekend",
12-
],
12+
schedule: ['after 10:00pm every weekday', 'before 5:00am every weekday', 'every weekend'],
1313
prConcurrentLimit: 8,
1414
prHourlyLimit: 4,
15-
timezone: "America/Tijuana",
15+
timezone: 'America/Tijuana',
1616

1717
// Commit and PR customization
18-
commitBody: "See associated pull request for more information.",
19-
semanticCommits: "enabled",
20-
semanticCommitScope: "",
21-
semanticCommitType: "build",
22-
labels: ["area: build & ci", "action: review"],
18+
commitBody: 'See associated pull request for more information.',
19+
semanticCommits: 'enabled',
20+
semanticCommitScope: '',
21+
semanticCommitType: 'build',
22+
labels: ['area: build & ci', 'action: merge'],
2323

2424
lockFileMaintenance: {
2525
enabled: true,
2626
},
2727

28+
// Feature disabled: permission to enable vulnerability alerts is not granted
29+
vulnerabilityAlerts: {
30+
enabled: false,
31+
},
32+
2833
// Ignored dependencies in all repositories
2934
ignoreDeps: [
30-
"build_bazel_rules_nodejs",
31-
"rules_pkg",
32-
"yarn", // Yarn is copied locally in all repositories where needed.
35+
'rules_pkg',
36+
'yarn', // Yarn is copied locally in all repositories where needed.
3337
],
38+
39+
// Renovate does not update Bazel lockfile for the time being.
40+
// Workaround for https://github.com/renovatebot/renovate/issues/25557
3441
postUpgradeTasks: {
35-
commands: ["foo-bar-command333"],
36-
fileFilters: ["MODULE.bazel.lock2"],
37-
executionMode: "branch",
42+
commands: [
43+
'.npmrc',
44+
'pnpm install --frozen-lockfile',
45+
'pnpm bazel mod deps --lockfile_mode=update',
46+
],
47+
fileFilters: ['MODULE.bazel.lock'],
48+
executionMode: 'branch',
3849
},
50+
3951
packageRules: [
40-
{
41-
matchDepNames: ["!zone.js"],
42-
enabled: false,
43-
},
4452
// ============================================================================
4553
// GENERAL GROUPING & UPDATE BEHAVIOR
4654
// ============================================================================
4755

48-
// Group all non-major updates (minor and patch) together
56+
// Rule to disable updates on branches other than 'main'.
4957
{
50-
groupName: "all non-major dependencies",
51-
matchDepNames: ["*", "!node", "!pnpm", "!npm", "!yarn"],
52-
matchUpdateTypes: ["digest", "patch", "minor"],
53-
postUpgradeTasks: null,
58+
'enabled': false,
59+
'matchBaseBranches': ['!main'],
60+
'matchDepNames': ['!node', '!pnpm', '!npm', '!yarn'],
5461
},
5562

63+
// Group all non-major dependencies together for updates on the 'main' branch.
64+
{
65+
'enabled': true,
66+
'matchBaseBranches': ['main'],
67+
'groupName': 'all non-major dependencies',
68+
'matchDepNames': ['*', '!node', '!pnpm', '!npm', '!yarn'],
69+
'matchUpdateTypes': ['digest', 'patch', 'minor'],
70+
},
5671
// ============================================================================
5772
// ECOSYSTEM-SPECIFIC GROUPING
5873
// ============================================================================
5974

6075
// Group Bazel updates
6176
{
62-
groupName: "bazel dependencies",
63-
matchManagers: ["bazel"],
77+
enabled: true,
78+
groupName: 'bazel dependencies',
79+
matchManagers: ['bazel'],
80+
},
81+
82+
// Group GitHub Actions workflow
83+
{
84+
enabled: true,
85+
groupName: 'all github actions',
86+
matchManagers: ['github-actions'],
6487
},
6588

6689
// ============================================================================
@@ -69,58 +92,54 @@
6992

7093
// Group updates related to Angular ecosystem across repositories
7194
{
72-
groupName: "cross-repo angular dependencies",
73-
followTag: "next",
95+
enabled: true,
96+
groupName: 'cross-repo angular dependencies',
97+
followTag: 'next',
7498
separateMajorMinor: false,
75-
schedule: ["at any time"],
99+
schedule: ['at any time'],
76100
matchPackageNames: [
77-
"@angular-devkit/**",
78-
"@angular/**",
79-
"@schematics/**",
80-
"angular/**",
81-
"ng-packagr",
101+
'@angular-devkit/**',
102+
'@angular/**',
103+
'@schematics/**',
104+
'angular/**',
105+
'ng-packagr',
82106
],
83107
},
84108

85109
// @angular/benchpress is not released as 'next'
86110
{
87111
followTag: null,
88-
matchDepNames: ["@angular/benchpress"],
112+
matchDepNames: ['@angular/benchpress'],
113+
},
114+
115+
// Disable 'postUpdateTasks' for changes that do not effect the BAZEL lock files or generated files.
116+
{
117+
matchManagers: ['github-actions'],
118+
postUpgradeTasks: null,
89119
},
90120

91121
// Disable 'next' tag tracking on non-main branches
92122
{
93-
matchBaseBranches: ["!main"],
123+
matchBaseBranches: ['!main'],
94124
followTag: null,
95125
},
96126

97127
// Keep minor and patch updates separate for TypeScript
98128
{
99-
matchDepNames: ["typescript"],
129+
matchDepNames: ['typescript'],
100130
separateMinorPatch: true,
101131
},
102132

103133
// Group TypeScript-related packages
104134
{
105-
groupName: "typescript dependencies",
106-
matchDepNames: ["typescript", "tslib"],
135+
groupName: 'typescript dependencies',
136+
matchDepNames: ['typescript', 'tslib'],
107137
},
108138

109139
// Limit how many times these packages get updated (They deploy each merged PR)
110140
{
111-
matchDepNames: ["renovate", "quicktype-core"],
112-
schedule: ["on sunday and wednesday"],
113-
},
114-
115-
// ============================================================================
116-
// WORKFLOW-SPECIFIC UPDATE RULES
117-
// ============================================================================
118-
119-
// Group dependencies in the scorecard GitHub Actions workflow
120-
{
121-
groupName: "scorecard action dependencies",
122-
matchFileNames: [".github/workflows/scorecard.yml"],
123-
matchDepNames: ["*"],
141+
matchDepNames: ['renovate', 'quicktype-core', 'google-closure-compiler'],
142+
schedule: ['on sunday and wednesday'],
124143
},
125144

126145
// ============================================================================
@@ -130,30 +149,36 @@
130149
// Disable updates for placeholder or 0.0.0-style versions
131150
{
132151
enabled: false,
133-
matchCurrentVersion: "/^[~^]?0\\.0\\.0-/",
152+
matchCurrentVersion: '/^[~^]?0\\.0\\.0-/',
134153
},
135154

136155
// Disable major updates for specified dependencies
137156
{
138157
enabled: false,
139158
matchDepNames: [
140-
"@types/node",
141-
"node",
142-
"bazel", // bazelisk bazel verison
143-
"npm",
144-
"pnpm",
145-
"rxjs",
146-
"tslib",
147-
"yarn",
159+
'@types/node',
160+
'node',
161+
'bazel', // bazelisk bazel version
162+
'npm',
163+
'rxjs',
164+
'tslib',
165+
'yarn',
148166
],
149-
matchUpdateTypes: ["major"],
167+
matchUpdateTypes: ['major'],
150168
},
151169

152170
// Disable TypeScript major and minor updates
153171
{
154172
enabled: false,
155-
matchDepNames: ["typescript"],
156-
matchUpdateTypes: ["major", "minor"],
173+
matchDepNames: ['typescript'],
174+
matchUpdateTypes: ['major', 'minor'],
175+
},
176+
177+
// Rule to disable major updates on branches other than 'main'.
178+
{
179+
'enabled': false,
180+
'matchBaseBranches': ['!main'],
181+
'matchUpdateTypes': ['major'],
157182
},
158183
],
159184
}

0 commit comments

Comments
 (0)