Skip to content

Commit a8056f6

Browse files
authored
[skip changelog] Update automation configs to use new label format (#1213)
The Arduino Tooling repositories now use a "category: name" format for all repository labels. Dependabot and the "stale-bot" workflow were using label names that do not comply with the new format, and so their configurations must be updated.
1 parent ab58758 commit a8056f6

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.dependabot/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ update_configs:
77
- match:
88
update_type: "security"
99
default_labels:
10-
- "component/dependencies"
10+
- "topic: dependencies"

.github/workflows/stale.yaml

+11-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
issue_comment:
88
types: ["created"]
99

10+
env:
11+
# Name of the label used to mark issues as stale.
12+
STALE_LABEL: "status: stale"
13+
1014
jobs:
1115
stale-bot:
1216
runs-on: ubuntu-latest
@@ -41,7 +45,7 @@ jobs:
4145
github.issues.addLabels({
4246
...context.repo,
4347
issue_number: issue.number,
44-
labels: ['stale']
48+
labels: ['${{ env.STALE_LABEL }}']
4549
});
4650
}
4751
@@ -52,7 +56,7 @@ jobs:
5256
github-token: ${{github.token}}
5357
script: |
5458
// Every time a comment is added to an issue, close it if it contains
55-
// the `stale` label.
59+
// the stale label.
5660
5761
// Load issue's labels.
5862
const opts = github.issues.listLabelsOnIssue.endpoint.merge({
@@ -61,13 +65,13 @@ jobs:
6165
});
6266
const labels = await github.paginate(opts);
6367
64-
// Search for `stale`.
68+
// Search for stale label.
6569
for (const label of labels) {
66-
if (label.name === 'stale') {
70+
if (label.name === '${{ env.STALE_LABEL }}') {
6771
await github.issues.removeLabel({
6872
...context.repo,
6973
issue_number: context.issue.number,
70-
name: 'stale'
74+
name: '${{ env.STALE_LABEL }}'
7175
})
7276
return;
7377
}
@@ -79,11 +83,11 @@ jobs:
7983
with:
8084
github-token: ${{github.token}}
8185
script: |
82-
// Load all the `stale` issues
86+
// Load all the stale issues
8387
const opts = github.issues.listForRepo.endpoint.merge({
8488
...context.repo,
8589
state: 'open',
86-
labels: ['stale'],
90+
labels: ['${{ env.STALE_LABEL }}'],
8791
});
8892
const issues = await github.paginate(opts);
8993

0 commit comments

Comments
 (0)