Skip to content

Commit 5dacb11

Browse files
authored
GHA: add override-missing-service-label job in override-labels workflow (#15389)
1 parent 9a95d0b commit 5dacb11

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/override-labels.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,22 @@ jobs:
2727
-H "X-GitHub-Api-Version: 2022-11-28" \
2828
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
2929
-d '{"state":"${{ env.STATE }}","description":"${{ env.DESCRIPTION }}","context":"terraform-provider-breaking-change-test"}'
30+
override-missing-service-label:
31+
runs-on: ubuntu-22.04
32+
if: github.event.label.name == 'override-missing-service-labels'
33+
permissions:
34+
statuses: write
35+
env:
36+
STATE: "${{ github.event.action == 'labeled' && 'success' || 'failure' }}"
37+
DESCRIPTION: "${{ github.event.action == 'labeled' && 'override-missing-service-labels applied' || 'override-missing-service-labels removed' }}"
38+
steps:
39+
- name: Override missing service label applied
40+
shell: bash
41+
run: |
42+
curl -L \
43+
-X POST \
44+
-H "Accept: application/vnd.github+json" \
45+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
46+
-H "X-GitHub-Api-Version: 2022-11-28" \
47+
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
48+
-d '{"state":"${{ env.STATE }}","description":"${{ env.DESCRIPTION }}","context":"override-missing-service-labels"}'

0 commit comments

Comments
 (0)