Skip to content

Commit

Permalink
docs: pr-label-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Apr 10, 2024
1 parent aebbec9 commit 5a2cdbb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pr-label-removal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Update PR Label to Closed

on:
pull_request_target:
types:
- opened
- edited
- reopened
- ready_for_review
- synchronize

pull_request:
types:
- closed
Expand All @@ -22,7 +30,7 @@ jobs:
REPO_NAME=$(basename $GITHUB_REPOSITORY)
# Get existing labels on the PR
EXISTING_LABELS=$(curl -s -H "Authorization: Bearer ${{ secrets.AUTO_RELEASE_PAT }}" \
EXISTING_LABELS=$(curl -s -H "Authorization: Bearer ${{ secrets.AUTORELEASE_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER" \
| jq -r '.labels | map(.name) | join(" ")')
Expand All @@ -40,4 +48,4 @@ jobs:
- name: Add new label
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
gh pr edit ${{ github.event.pull_request.number }} --add-label "closed"
gh pr edit ${{ github.event.pull_request.number }} --add-label "Closed"

0 comments on commit 5a2cdbb

Please sign in to comment.