Skip to content

update builtin global metadata #2

update builtin global metadata

update builtin global metadata #2

Workflow file for this run

name: Remove Labels on PR Update
on:
pull_request_target:
types: [synchronize]
jobs:
remove-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Remove all labels
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
LABELS=$(gh pr view "$PR_NUMBER" --json labels -q '.labels[].name')
echo $PR_NUMBER
echo $LABELS
if [ -n "$LABELS" ]; then
for label in $LABELS; do
gh pr edit "$PR_NUMBER" --remove-label "$label"
done
else
echo "No labels to remove."
fi
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}