forked from wylab/wylab-station-14
19 lines
642 B
YAML
19 lines
642 B
YAML
name: "Labels: Review"
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [review_requested, opened]
|
|
|
|
jobs:
|
|
add_label:
|
|
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":["S: Needs Review"]}' "$API"
|
|
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/S%3A%20Awaiting%20Changes" || true
|