mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-27 21:34:38 -05:00
Update label_checker.yml
This commit is contained in:
34
.github/workflows/label_checker.yml
vendored
34
.github/workflows/label_checker.yml
vendored
@@ -13,31 +13,27 @@ permissions:
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
ready-deploy:
|
||||
check-label:
|
||||
runs-on: ubuntu-latest
|
||||
name: Breaking changes label checker
|
||||
steps:
|
||||
- name: Pass if labeled
|
||||
if: "contains(github.event.pull_request.labels.*.name, 'Breaking changes') || contains(github.event.pull_request.labels.*.name, 'Non breaking changes')"
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
|
||||
--header 'authorization: Bearer ${{secrets.GITHUB_TOKEN}}' \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"context": "Breaking changes label checker",
|
||||
"state": "success",
|
||||
"description": "Already labeled. Thank you."
|
||||
}'
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{secrets.GITHUB_TOKEN}}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
|
||||
-d '{"state":"success","description":"Labeled. Thank you.","context":"Breaking changes label checker"}'
|
||||
- name: Pending if not labeled
|
||||
if: "!(contains(github.event.pull_request.labels.*.name, 'Breaking changes') || contains(github.event.pull_request.labels.*.name, 'Non breaking changes'))"
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
|
||||
--header 'authorization: Bearer ${{secrets.GITHUB_TOKEN}}' \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"context": "Breaking changes label checker",
|
||||
"state": "pending",
|
||||
"description": "Please label \"Breaking changes\" or \"Non Breaking changes\"."
|
||||
}'
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{secrets.GITHUB_TOKEN}}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
|
||||
-d '{"state":"failure","description":"Please label Breaking changes or Non Breaking changes.","context":"Breaking changes label checker"}'
|
||||
|
||||
Reference in New Issue
Block a user