Skip to content

Commit

Permalink
fix(Jira): Handling of issues with no priority label (#573)
Browse files Browse the repository at this point in the history
The code seems to work! ...In the case where there is a priority label
on the issue. Jira complains if the priority field is just "", so we
need to get rid of it
  • Loading branch information
croyzor authored Sep 28, 2023
1 parent 871ecb8 commit d38bb33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,23 @@ jobs:
if: ${{ contains(github.event.issue.labels.*.name, 'bug') }}
env:
JIRA_PRIORITY: ${{ steps.set_priority_var.outputs.JIRA_PRIORITY }}
JIRA_PRIORITY_FIELD: ', "priority": { "name": "${{ env.JIRA_PRIORITY }}" }'
with:
project: TKET
issuetype: Bug
summary: « [hugr] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
fields: '{"labels": ["hugr"], "priority": { "name": "${{ env.JIRA_PRIORITY }}" }}'
fields: '{ "labels": ["hugr"] ${{ env.JIRA_PRIORITY_FIELD }} }'

- name: Create Task
uses: atlassian/[email protected]
if: ${{ ! contains(github.event.issue.labels.*.name, 'bug') }}
env:
JIRA_PRIORITY: ${{ steps.set_priority_var.outputs.JIRA_PRIORITY }}
JIRA_PRIORITY_FIELD: ', "priority": { "name": "${{ env.JIRA_PRIORITY }}" }'
with:
project: TKET
issuetype: Task
summary: « [hugr] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
fields: '{"labels": ["hugr"], "priority": { "name": "${{ env.JIRA_PRIORITY }}" }}'
fields: '{ "labels": ["hugr"] ${{ env.JIRA_PRIORITY_FIELD }} }'

0 comments on commit d38bb33

Please sign in to comment.