Skip to content

Commit 31730e8

Browse files
committed
chore(ci): add labeler and stale workflows
- Introduced a labeler configuration to automate labeling based on file changes. - Added a stale workflow to manage inactive issues and pull requests, including customizable messages and timing for stale checks. Signed-off-by: Cory Rylan <crylan@nvidia.com>
1 parent 64eac99 commit 31730e8

3 files changed

Lines changed: 164 additions & 0 deletions

File tree

.github/labeler.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
'dependencies':
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- '**/package.json'
5+
- 'pnpm-lock.yaml'
6+
- 'pnpm-workspace.yaml'
7+
8+
'github_actions':
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
- '.github/actions/**'
12+
- '.github/dependabot.yml'
13+
- '.github/workflows/**'
14+
15+
'scope(ci)':
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- '.github/**'
19+
- 'commitlint.config.js'
20+
- 'config/**'
21+
- 'package.json'
22+
- 'pnpm-lock.yaml'
23+
- 'release.config.js'
24+
- 'projects/internals/ci/**'
25+
26+
'scope(cli)':
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- 'projects/cli/**'
30+
31+
'scope(code)':
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- 'projects/code/**'
35+
36+
'scope(core)':
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- 'projects/core/**'
40+
41+
'scope(create)':
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- 'projects/create/**'
45+
46+
'scope(docs)':
47+
- changed-files:
48+
- any-glob-to-any-file:
49+
- 'projects/site/**'
50+
51+
'scope(forms)':
52+
- changed-files:
53+
- any-glob-to-any-file:
54+
- 'projects/forms/**'
55+
56+
'scope(internals)':
57+
- changed-files:
58+
- any-glob-to-any-file:
59+
- 'projects/internals/**'
60+
61+
'scope(lint)':
62+
- changed-files:
63+
- any-glob-to-any-file:
64+
- 'projects/lint/**'
65+
66+
'scope(markdown)':
67+
- changed-files:
68+
- any-glob-to-any-file:
69+
- 'projects/markdown/**'
70+
71+
'scope(media)':
72+
- changed-files:
73+
- any-glob-to-any-file:
74+
- 'projects/media/**'
75+
76+
'scope(monaco)':
77+
- changed-files:
78+
- any-glob-to-any-file:
79+
- 'projects/monaco/**'
80+
81+
'scope(pages)':
82+
- changed-files:
83+
- any-glob-to-any-file:
84+
- 'projects/pages/**'
85+
86+
'scope(starters)':
87+
- changed-files:
88+
- any-glob-to-any-file:
89+
- 'projects/starters/**'
90+
91+
'scope(styles)':
92+
- changed-files:
93+
- any-glob-to-any-file:
94+
- 'projects/styles/**'
95+
96+
'scope(themes)':
97+
- changed-files:
98+
- any-glob-to-any-file:
99+
- 'projects/themes/**'
100+
101+
'type(chore)':
102+
- head-branch:
103+
- '^chore[/-]'
104+
105+
'type(feat)':
106+
- head-branch:
107+
- '^feat[/-]'
108+
109+
'type(fix)':
110+
- head-branch:
111+
- '^fix[/-]'

.github/workflows/label.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Label
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
label:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
steps:
18+
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213
19+
with:
20+
sync-labels: false

.github/workflows/stale.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Stale
2+
3+
on:
4+
schedule:
5+
- cron: '0 7 * * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: stale-workflow
10+
cancel-in-progress: true
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
steps:
19+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f
20+
with:
21+
stale-issue-label: stale
22+
stale-pr-label: stale
23+
stale-issue-message: This issue has had no activity for 90 days. Comment or remove the stale label if it is still actionable; otherwise it will close in 14 days.
24+
stale-pr-message: This pull request has had no activity for 30 days. Comment or remove the stale label when it is ready for review.
25+
close-issue-message: Closing because this issue stayed stale for 14 days with no activity.
26+
days-before-issue-stale: 90
27+
days-before-pr-stale: 30
28+
days-before-issue-close: 14
29+
days-before-pr-close: -1
30+
close-issue-reason: not_planned
31+
exempt-all-assignees: true
32+
exempt-draft-pr: true
33+
operations-per-run: 100

0 commit comments

Comments
 (0)