forked from wylab/wylab-station-14
21 lines
688 B
YAML
21 lines
688 B
YAML
name: "Labels: Approve"
|
|
|
|
on:
|
|
pull_request_review:
|
|
types: [submitted]
|
|
|
|
jobs:
|
|
remove_label:
|
|
permissions:
|
|
pull-requests: write
|
|
if: github.event.review.state == 'approved'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Remove review 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 DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Needs%20Review" || true
|
|
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Awaiting%20Changes" || true
|