Skip to content

Commit

Permalink
Update ticket pattern from 'apm' to 'npa'
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-hollow1-nhsd committed Feb 13, 2024
1 parent 6b3e11e commit a3adf44
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pr-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check ticket name conforms to requirements
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "(apm-[0-9]+)|(apmspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(dependabot\/)"
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "(npa-[0-9]+)|(npaspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(dependabot\/)"
continue-on-error: true

- name: Grab ticket name
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(apm-[0-9]\+\)\|\(apmspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-') || contains(github.event.pull_request.head.ref, 'npaspii-') || contains(github.event.pull_request.head.ref, 'NPASPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(npa-[0-9]\+\)\|\(npaspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
continue-on-error: true
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Comment on PR with link to JIRA ticket
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
if: contains(github.event.pull_request.head.ref, 'npa-') || contains(github.event.pull_request.head.ref, 'NPA-') || contains(github.event.pull_request.head.ref, 'npaspii-') || contains(github.event.pull_request.head.ref, 'NPASPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
continue-on-error: true
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})

0 comments on commit a3adf44

Please sign in to comment.