Skip to content

Commit

Permalink
fix(ci): correct jira incident ticket duplication (#4157)
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed May 28, 2024
1 parent 5cc2317 commit 80a7a9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/veracode-create-jira-ticket/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ runs:
- name: Check if ticket exists already
id: check_ticket
run: |
# Checking if an incident ticket already exists
check_if_ticket_exists=$( curl --request POST \
--url '${{ inputs.jira_base_url }}/rest/api/3/search' \
--user '${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": ["summary"],
"jql": "project = MON AND parentEpic = AT-268 AND issueType = Technical AND summary ~ \"PR-${{ github.event.pull_request.number }} incident on ${{ inputs.module_name }}\" AND resolution = unresolved",
"jql": "project = MON AND parentEpic = AT-268 AND issueType = Technical AND summary ~ \"PR-${{ github.event.pull_request.number }} incident\" AND component = \"${{ inputs.module_name }}\" AND resolution = unresolved ORDER BY key ASC",
"maxResults": 1
}' | jq .issues[0].key )
Expand All @@ -41,6 +42,7 @@ runs:
- name: Create Jira Issue
if: ${{ env.abort_ticket_creation != 'true' }}
run: |
# Creating a new incident ticket on Jira
DATA=$( cat <<-EOF
{
"fields": {
Expand Down

0 comments on commit 80a7a9e

Please sign in to comment.