Skip to content

Commit

Permalink
Merge pull request #1077 from CrowleyRajapakse/newmaster
Browse files Browse the repository at this point in the history
Adding delete workflow trigger action
  • Loading branch information
CrowleyRajapakse authored Feb 16, 2024
2 parents b56e34c + f972114 commit 2d2aea1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/delete-workflow-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Remove github integration action trigger label
on:
pull_request_target:
types:
- synchronize
- closed
concurrency:
group: apim-apk-agent-${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
remove-label:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Remove label
run: |
TOKEN="${{ secrets.GITHUB_TOKEN }}"
PR_NUMBER="${{ github.event.number }}"
LABEL_TO_REMOVE="trigger-action"
# Remove the label from the pull request
curl -X DELETE \
-H "Authorization: token $TOKEN" \
"https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels/${LABEL_TO_REMOVE}"

0 comments on commit 2d2aea1

Please sign in to comment.