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..cc47cfc6 100644 --- a/.github/workflows/pr-link.yml +++ b/.github/workflows/pr-link.yml @@ -1,12 +1,14 @@ name: PR Link ticket on: pull_request: - types: [opened] + types: [ opened ] jobs: link-ticket: runs-on: ubuntu-22.04 env: REF: ${{ github.event.pull_request.head.ref }} + permissions: + id-token: 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@v8 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 }}) + github-token: ${{ secrets.GITHUB_TOKEN }} + 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 is a handy link to the ticket: + # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})" diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 0c3febbc..f20e1f98 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -29,6 +29,8 @@ jobs: regression_tests: permissions: id-token: write + issues: write + pull-requests: write runs-on: ubuntu-22.04 environment: ${{ inputs.environment }} steps: @@ -98,6 +100,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