Skip to content

Commit

Permalink
Merge pull request #2343 from vrm-c/Santarh-patch-1
Browse files Browse the repository at this point in the history
Update Label Checker
  • Loading branch information
Santarh committed Jul 4, 2024
2 parents e606673 + 5df9855 commit 8ea82c4
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/label_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,12 @@ 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."
}'
- name: Pending if not labeled
- name: Failed 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\"."
}'
echo "::error::Please label \"Breaking changes\" or \"Non breaking changes\"."
exit 1

0 comments on commit 8ea82c4

Please sign in to comment.