mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 06:19:47 -05:00
Merge pull request #2340 from vrm-c/Santarh-patch-1
Add PullRequest Label checker
This commit is contained in:
commit
ed8d5df57f
43
.github/workflows/label_checker.yml
vendored
Normal file
43
.github/workflows/label_checker.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
name: Breaking changes label checker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- synchronize
|
||||
- labeled
|
||||
- unlabeled
|
||||
- opened
|
||||
- reopened
|
||||
|
||||
permissions:
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
ready-deploy:
|
||||
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."
|
||||
}'
|
||||
- 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\"."
|
||||
}'
|
||||
Loading…
Reference in New Issue
Block a user