From 17959d8cc0567821adb1a34dd29a1a9299a23541 Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 07:42:06 -0700 Subject: [PATCH 1/9] DEVOPS-1032 temp change --- .github/workflows/reusable-jira-pr_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index ae5333c..51f37b8 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -1,5 +1,6 @@ # This workflow will update the PR title and body with the JIRA issue summary # when a JIRA issue number is detected in the branch name or title +# temp change to force build name: Jira issue jobs From 717e35e7b493b091f2f209d4a957293b1b6589df Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 07:48:22 -0700 Subject: [PATCH 2/9] DEVOPS-1032 add pr_actions --- .github/workflows/jira-pr_add_jira_summary.yml | 17 ----------------- .github/workflows/pr_jira_actions.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/jira-pr_add_jira_summary.yml create mode 100644 .github/workflows/pr_jira_actions.yml diff --git a/.github/workflows/jira-pr_add_jira_summary.yml b/.github/workflows/jira-pr_add_jira_summary.yml deleted file mode 100644 index e6d3c65..0000000 --- a/.github/workflows/jira-pr_add_jira_summary.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Add JIRA issue summary - -permissions: - contents: read - pull-requests: write - -on: - pull_request: - types: [opened] - -jobs: - call-workflow-add-jira-issue-summary: - uses: ./.github/workflows/reusable-jira-pr_add_jira_summary.yml - secrets: - JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} - JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} - JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} diff --git a/.github/workflows/pr_jira_actions.yml b/.github/workflows/pr_jira_actions.yml new file mode 100644 index 0000000..4fa28f8 --- /dev/null +++ b/.github/workflows/pr_jira_actions.yml @@ -0,0 +1,16 @@ +name: JIRA actions + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + call-workflow-pr_jira_actions: + uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@v3 + permissions: + contents: read + pull-requests: write + secrets: + JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} + JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} From bddb25f962ebd4d381da5dd1dc72e658d841d26a Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 07:51:55 -0700 Subject: [PATCH 3/9] DEVOPS-1032 test to see if it's a permission problem --- .github/workflows/pr_jira_actions.yml | 4 +--- .github/workflows/reusable-jira-pr_actions.yml | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_jira_actions.yml b/.github/workflows/pr_jira_actions.yml index 4fa28f8..0cd3ada 100644 --- a/.github/workflows/pr_jira_actions.yml +++ b/.github/workflows/pr_jira_actions.yml @@ -7,9 +7,7 @@ on: jobs: call-workflow-pr_jira_actions: uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@v3 - permissions: - contents: read - pull-requests: write + permissions: * secrets: JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index 51f37b8..8432959 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -1,6 +1,5 @@ # This workflow will update the PR title and body with the JIRA issue summary # when a JIRA issue number is detected in the branch name or title -# temp change to force build name: Jira issue jobs @@ -23,9 +22,7 @@ env: JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} -permissions: - contents: read - pull-requests: write +permissions: * jobs: get_issue_key: From 2e1106a7d3974963377ca460c071dcaee503905e Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:01:06 -0700 Subject: [PATCH 4/9] DEVOPS-1032 set perm to write-all, to test --- .github/workflows/pr_jira_actions.yml | 2 +- .github/workflows/reusable-jira-pr_actions.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_jira_actions.yml b/.github/workflows/pr_jira_actions.yml index 0cd3ada..51f3417 100644 --- a/.github/workflows/pr_jira_actions.yml +++ b/.github/workflows/pr_jira_actions.yml @@ -7,7 +7,7 @@ on: jobs: call-workflow-pr_jira_actions: uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@v3 - permissions: * + permissions: write-all secrets: JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index 8432959..b1813d5 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -22,7 +22,7 @@ env: JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} -permissions: * +permissions: write-all jobs: get_issue_key: From 6db8e61be035ac8166b6ea989274dbdcddc7d420 Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:27:57 -0700 Subject: [PATCH 5/9] DEVOPS-1032 forgot to point at this tag --- .github/workflows/pr_jira_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_jira_actions.yml b/.github/workflows/pr_jira_actions.yml index 51f3417..e31e439 100644 --- a/.github/workflows/pr_jira_actions.yml +++ b/.github/workflows/pr_jira_actions.yml @@ -6,7 +6,7 @@ on: jobs: call-workflow-pr_jira_actions: - uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@v3 + uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@DEVOPS-1032-pr-action-query-issue permissions: write-all secrets: JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} From 10cab774659599e5df0c382760ae6df39c477655 Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:29:21 -0700 Subject: [PATCH 6/9] DEVOPS-1032 print out response --- .github/workflows/reusable-jira-pr_actions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index b1813d5..8367a9c 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -150,6 +150,8 @@ jobs: --header 'Accept: application/json' \ --header 'Content-Type: application/json') + echo "response=$response" + if [ $? -ne 0 ]; then echo "Jira API: error" exit 1 From 8bafcadf7be1be3804153adab55f9eb596b62f60 Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:31:09 -0700 Subject: [PATCH 7/9] DEVOPS-1032 more debug output: url/query string --- .github/workflows/reusable-jira-pr_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index 8367a9c..799e1f1 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -150,6 +150,7 @@ jobs: --header 'Accept: application/json' \ --header 'Content-Type: application/json') + echo "$JIRA_BASE_URL/rest/api/3/search/jql?jql=$jqlencoded&fields=statusCategory" echo "response=$response" if [ $? -ne 0 ]; then From 3d314f5ddb19af92394e4f1158c784587fc2b8da Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:43:04 -0700 Subject: [PATCH 8/9] DEVOPS-1032 try to see email --- .github/workflows/reusable-jira-pr_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index 799e1f1..52fafb4 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -152,6 +152,7 @@ jobs: echo "$JIRA_BASE_URL/rest/api/3/search/jql?jql=$jqlencoded&fields=statusCategory" echo "response=$response" + echo "email: $JIRA_USER_EMAIL" if [ $? -ne 0 ]; then echo "Jira API: error" From cb5ce6110fb82e8f8e5f55784913cdc630b2b34c Mon Sep 17 00:00:00 2001 From: andrewg-mira <89816284+andrewg-mira@users.noreply.github.com> Date: Tue, 31 Mar 2026 09:35:07 -0700 Subject: [PATCH 9/9] DEVOPS-1032 verbose curl output --- .github/workflows/reusable-jira-pr_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-jira-pr_actions.yml b/.github/workflows/reusable-jira-pr_actions.yml index 52fafb4..b58503c 100644 --- a/.github/workflows/reusable-jira-pr_actions.yml +++ b/.github/workflows/reusable-jira-pr_actions.yml @@ -144,7 +144,7 @@ jobs: jql="Sprint in (openSprints(), futureSprints()) and issue=$issue_key" jqlencoded=$(jq -R -r @uri <<<"$jql") - response=$(curl -fsS --request GET \ + response=$(curl -vvv -fsS --request GET \ --url "$JIRA_BASE_URL/rest/api/3/search/jql?jql=$jqlencoded&fields=statusCategory" \ --user "${JIRA_USER_EMAIL}:${JIRA_API_TOKEN}" \ --header 'Accept: application/json' \