test PR #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Label PRs | |
on: | |
pull_request: | |
types: [review_requested, synchronize, reopened] | |
issue_comment: | |
types: [created] | |
jobs: | |
update-labels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Remove 'waiting for changes' and Add 'waiting for review' label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: waiting for review | |
- name: Remove 'waiting for changes' label if exists | |
run: | | |
if gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name' | grep -q 'waiting for changes'; then | |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "waiting for changes" | |
fi |