From d38bb335b7bb519d0c72bf56f7ccfd640eae20ac Mon Sep 17 00:00:00 2001 From: Craig Roy Date: Thu, 28 Sep 2023 15:07:01 +0100 Subject: [PATCH] fix(Jira): Handling of issues with no priority label (#573) 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 --- .github/workflows/issue.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index ffd1129cc..2419e486d 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -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/gajira-create@v3.0.1 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 }} }'