Skip to content

Commit a6e75b0

Browse files
committed
[bfops/label-check]: fix
1 parent b7b0640 commit a6e75b0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/check-merge-labels.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: Check merge labels
22

33
on:
44
pull_request:
5-
types: [labeled, unlabeled]
5+
types: [opened, reopened, labeled, unlabeled]
66
merge_group:
7+
78
permissions: read-all
89

910
jobs:
1011
label_checks:
1112
name: Check merge labels
1213
runs-on: ubuntu-latest
1314
steps:
14-
- if: contains(github.event.pull_request.labels.*.name, 'do not merge')
15-
run: exit 0
15+
- if: github.event_name == 'merge_group'
16+
run: echo "Merge group run; skipping merge-label checks."
1617

17-
- if: contains(github.event.pull_request.labels.*.name, 'do not merge')
18+
- if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'do not merge')
1819
run: |
1920
echo "This is labeled \"Do not merge\"."
2021
exit 1

0 commit comments

Comments
 (0)