Skip to content

Commit 0f785c4

Browse files
authored
Run label check workflow only on label events and open pr event (#4830)
## **PR Description** - Currently, `check-required-label` only runs when commits are added to a PR, even if a maintainer has added labels, so the CI status remains red until a commit is pushed after labels are added by a maintainer. - I updated the workflows to run `check-required-label` only on label events(add/remove) or open PR event. - This will make PR status updates more accurate, so authors will be able to see that tests and lint are passing by just checking the PR status, and maintainers will easily know if the PR is ready for review.
2 parents 1639e17 + e932ea2 commit 0f785c4

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Check Required Labels
2+
3+
on:
4+
pull_request:
5+
types: [opened, labeled, unlabeled]
6+
7+
jobs:
8+
check-required-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: mheap/github-action-required-labels@v5
12+
with:
13+
mode: exactly
14+
count: 1
15+
labels: "ignore-for-release, feature, enhancement, bug, maintenance, docs, i18n, performance"

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,6 @@ jobs:
175175
- name: errors
176176
run: golangci-lint run
177177
if: ${{ failure() }}
178-
check-required-label:
179-
runs-on: ubuntu-latest
180-
if: github.ref != 'refs/heads/master'
181-
steps:
182-
- uses: mheap/github-action-required-labels@v5
183-
with:
184-
mode: exactly
185-
count: 1
186-
labels: "ignore-for-release, feature, enhancement, bug, maintenance, docs, i18n, performance"
187178
upload-coverage:
188179
# List all jobs that produce coverage files
189180
needs: [unit-tests, integration-tests]

0 commit comments

Comments
 (0)