Skip to content

Commit d011875

Browse files
committed
Add a workflow to remove the safe to test label on PR updates.
1 parent 677824a commit d011875

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/pr_sync.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Remove label when new commits are pushed
2+
3+
on:
4+
pull_request:
5+
types: [synchronize]
6+
7+
jobs:
8+
remove-label:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
13+
steps:
14+
- name: Remove label
15+
env:
16+
LABEL_NAME: safe-to-test
17+
OWNER: ${{ github.repository_owner }}
18+
REPO: ${{ github.event.pull_request.base.repo.name }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
run: |
21+
echo "Removing label '$LABEL_NAME' from PR #$PR_NUMBER on repo $REPO"
22+
23+
- name: Remove label with gh CLI
24+
run: gh api repos/$REPO/issues/$PR_NUMBER/labels/$LABEL_NAME -X DELETE || true

0 commit comments

Comments
 (0)