Add GitHub workflows to auto-label PRs #2
This file contains hidden or 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: Handle GitHub PR Review responses | |
| on: | |
| pull_request_review: | |
| types: | |
| - submitted | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| # Label PR as "waiting-author-response" when changes are requested | |
| review-changes-requested: | |
| runs-on: ubuntu-latest | |
| if: github.event.review.state == 'changes_requested' && github.repository == 'stackhpc/stackhpc-kayobe-config' | |
| steps: | |
| - name: Update PR Labels | |
| run: | | |
| gh pr edit "$PR_NUMBER" --remove-label "waiting-review" || true | |
| gh pr edit "$PR_NUMBER" --add-label "waiting-author-response" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} |