Skip to content

Commit 0883d49

Browse files
authored
Auto add and remove of "status: changes-required" label (#13778)
* Auto remove of "status: changes-required" label * Streamline edit * Automatically add label changes-requested * Remove review labels on changes requested
1 parent 39937a6 commit 0883d49

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Adapt PR status labels
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted]
6+
7+
jobs:
8+
label-changes-required:
9+
if: github.event.review.state == 'changes_requested'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Adapt labels
13+
run: |
14+
gh issue --repo ${{ github.repository }} edit ${{ github.event.pull_request.number }} --remove-label "status: ready-for-review"
15+
gh issue --repo ${{ github.repository }} edit ${{ github.event.pull_request.number }} --remove-label "status: awaiting-second-review"
16+
gh issue --repo ${{ github.repository }} edit ${{ github.event.pull_request.number }} --add-label "status: changes-required"
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/on-pr-opened-updated.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ jobs:
160160
echo "✅ No merge conflicts"
161161
env:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
remove_label:
164+
if: github.repository == 'JabRef/jabref'
165+
name: Remove label "status: changes-required"
166+
runs-on: ubuntu-latest
167+
steps:
168+
- run: gh issue --repo ${{ github.repository }} edit ${{ github.event.pull_request.number }} --remove-label "status: changes-required"
163169
upload-pr-number:
164170
if: github.repository == 'JabRef/jabref'
165171
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)