From 363c13250b4f69156b01d5d46fc09122c6510683 Mon Sep 17 00:00:00 2001 From: SeanSteberis <103416906+seansteberisal@users.noreply.github.com> Date: Fri, 19 Sep 2025 01:33:08 +0100 Subject: [PATCH 1/4] attempt to assume role for dev --- .github/workflows/regression_tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 0c3febbc..8fca09df 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -98,6 +98,12 @@ jobs: if: steps.cache-venv.outputs.cache-hit != 'true' run: make install + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v5.0.0 + with: + aws-region: eu-west-2 + role-to-assume: arn:aws:iam::448049830832:role/Eligibility-Signposting-API-E2E-Regression-Tests + - name: Regression Tests id: tests continue-on-error: true From f1f84dbccb2053d8e1b2a69303eb25e5c30d3ca1 Mon Sep 17 00:00:00 2001 From: SeanSteberis <103416906+seansteberisal@users.noreply.github.com> Date: Fri, 19 Sep 2025 01:50:56 +0100 Subject: [PATCH 2/4] update to pr-link which should start linking the jira ticket --- .github/pull_request_template.md | 4 ++-- .github/workflows/pr-link.yml | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c18f0bef..643cd94a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,7 +17,7 @@ Add any summary information of what is in the change. **Remove this line if you Pull requests should be named using the following format: ```text -Tag: [AEA-NNNN] - Short description +Tag: [ELI-NNNN] - Short description ``` Tag can be one of: @@ -45,7 +45,7 @@ The description of your pull request will be used as the commit message for the If you need to rename your pull request, you can restart the checks by either: - Closing and reopening the pull request -- pushing an empty commit +- pushing an empty commit ```bash git commit --allow-empty -m 'trigger build' git push diff --git a/.github/workflows/pr-link.yml b/.github/workflows/pr-link.yml index 83dbaf9c..6d77bd87 100644 --- a/.github/workflows/pr-link.yml +++ b/.github/workflows/pr-link.yml @@ -7,6 +7,8 @@ jobs: runs-on: ubuntu-22.04 env: REF: ${{ github.event.pull_request.head.ref }} + permissions: + pull-requests: write steps: - name: Check ticket name conforms to requirements run: echo "$REF" | grep -i -E -q "(eli-[0-9]+)|(dependabot\/)" @@ -31,10 +33,13 @@ jobs: - name: Comment on PR with link to JIRA ticket if: contains(github.event.pull_request.head.ref, 'eli-') continue-on-error: true - uses: unsplash/comment-on-pr@b5610c6125a7197eaec80072ea35ef53e1fc6035 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: actions/github-script@v6 with: - msg: | - This branch is work on a ticket in an NHS England JIRA Project. Here's a handy link to the ticket: - # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }}) + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'This branch is work on a ticket in an NHS England JIRA Project. Here's a handy link to the ticket: + # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})' + }) From b66c588d8475c326861d41b0437b5a0249d35476 Mon Sep 17 00:00:00 2001 From: SeanSteberis <103416906+seansteberisal@users.noreply.github.com> Date: Fri, 19 Sep 2025 01:54:44 +0100 Subject: [PATCH 3/4] update github-script action version --- .github/workflows/pr-link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-link.yml b/.github/workflows/pr-link.yml index 6d77bd87..680f1c8e 100644 --- a/.github/workflows/pr-link.yml +++ b/.github/workflows/pr-link.yml @@ -33,7 +33,7 @@ jobs: - name: Comment on PR with link to JIRA ticket if: contains(github.event.pull_request.head.ref, 'eli-') continue-on-error: true - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: | github.rest.issues.createComment({ From b9b2a666b32bb2e7aadbdaefc9197a08737519a5 Mon Sep 17 00:00:00 2001 From: SeanSteberis <103416906+seansteberisal@users.noreply.github.com> Date: Fri, 19 Sep 2025 01:58:31 +0100 Subject: [PATCH 4/4] Syntax error --- .github/workflows/pr-link.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-link.yml b/.github/workflows/pr-link.yml index 680f1c8e..56cc9235 100644 --- a/.github/workflows/pr-link.yml +++ b/.github/workflows/pr-link.yml @@ -1,7 +1,7 @@ name: PR Link ticket on: pull_request: - types: [opened] + types: [ opened ] jobs: link-ticket: runs-on: ubuntu-22.04 @@ -40,6 +40,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'This branch is work on a ticket in an NHS England JIRA Project. Here's a handy link to the ticket: + body: 'This branch is work on a ticket in an NHS England JIRA Project. Here is a handy link to the ticket: # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})' })