Skip to content

After Approval

After Approval #113

name: After Approval
on:
pull_request_review:
types: [submitted]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
label-pr:
if: github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'extended-tests')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Add label for extended tests
env:
GH_TOKEN: ${{ secrets.ADD_LABEL_PAT }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "Adding label 'extended-tests' to PR $NUMBER"
gh pr edit "$NUMBER" --add-label "extended-tests" || (echo "Failed to add label" && exit 1)