Skip to content

Commit 1b6b151

Browse files
workflows/labels: skip for staging-next / haskell-updates / python-updates (#402332)
2 parents 53721f4 + 5ed0205 commit 1b6b151

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file is used by .github/workflows/labels.yml
2+
# This version is only run for Pull Requests from protected branches like staging-next, haskell-updates or python-updates.
3+
4+
"4.workflow: package set update":
5+
- any:
6+
- head-branch:
7+
- '-updates$'
8+
9+
"4.workflow: staging":
10+
- any:
11+
- head-branch:
12+
- '^staging-next$'
13+
- '^staging-next-'
14+
15+
"6.topic: haskell":
16+
- any:
17+
- head-branch:
18+
- '^haskell-updates$'
19+
20+
"6.topic: python":
21+
- any:
22+
- head-branch:
23+
- '^python-updates$'

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1
55

6+
"4.workflow: backport":
7+
- any:
8+
- base-branch:
9+
- '^release-'
10+
- '^staging-'
11+
612
# NOTE: bsd, darwin and cross-compilation labels are handled by ofborg
713
"6.topic: agda":
814
- any:

.github/workflows/labels.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,23 @@ jobs:
2020
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
2121
steps:
2222
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
23+
if: "!(github.pull_request.head.repo == 'NixOS' && github.ref_protected)"
2324
with:
2425
repo-token: ${{ secrets.GITHUB_TOKEN }}
2526
configuration-path: .github/labeler.yml # default
2627
sync-labels: true
2728
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
29+
if: "!(github.pull_request.head.repo == 'NixOS' && github.ref_protected)"
2830
with:
2931
repo-token: ${{ secrets.GITHUB_TOKEN }}
3032
configuration-path: .github/labeler-no-sync.yml
3133
sync-labels: false
34+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
35+
# Protected branches like staging-next, haskell-updates and python-updates get special labels.
36+
# This is to avoid the mass of labels there, which is mostly useless - and really annoying for
37+
# the backport labels.
38+
if: "github.pull_request.head.repo == 'NixOS' && github.ref_protected"
39+
with:
40+
repo-token: ${{ secrets.GITHUB_TOKEN }}
41+
configuration-path: .github/labeler-protected-branches.yml
42+
sync-labels: true

0 commit comments

Comments
 (0)