forked from wylab/wylab-station-14
22 lines
742 B
YAML
22 lines
742 B
YAML
name: "Labels: Changes"
|
|
|
|
on:
|
|
pull_request_review:
|
|
types: [submitted]
|
|
|
|
jobs:
|
|
update_label:
|
|
permissions:
|
|
pull-requests: write
|
|
if: github.event.review.state == 'changes_requested'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Update labels
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
|
curl -sS -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" \
|
|
-d '{"labels":["Status: Awaiting Changes"]}' "$API"
|
|
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Needs%20Review" || true
|