Skip to content

Commit

Permalink
ignore issues with an OWS label
Browse files Browse the repository at this point in the history
  • Loading branch information
auhlig committed Jun 17, 2024
1 parent 7534a19 commit 63f7135
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ runs:
echo "Not interested in this action, skipping"
exit 0
fi
# Exit if the issue already has an OWS label.
# TODO: Support updates to Jira issues.
for label in "${{ github.event.issue.labels.*.name }}"; do
if [[ "$label" == OWS* ]]; then
echo "Issue has a label starting with OWS, skipping"
exit 0
fi
done
# last one wins
echo "NeedsJiraUpdate=true" >> $GITHUB_ENV
Expand Down Expand Up @@ -235,6 +244,7 @@ runs:
echo "Linked jira issue ${{ steps.create_jira_issue.outputs.jira_issue_key }} to jira epic ${{ inputs.JIRA_EPIC_KEY }}"
- name: Adding label to GitHub issue
if: ${{ env.NeedsJiraUpdate == 'true' }}
shell: bash
run: |
issue_number=${{ github.event.issue.number }}
Expand All @@ -249,6 +259,7 @@ runs:
"https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}/labels"
- name: Remove specific label from issue
if: ${{ env.NeedsJiraUpdate == 'true' }}
shell: bash
run: |
label_to_remove="${{ inputs.label }}"
Expand Down

0 comments on commit 63f7135

Please sign in to comment.