Skip to content

Release/2024 11 01 #1409

Release/2024 11 01

Release/2024 11 01 #1409

Workflow file for this run

name: PR Quality Check
on: pull_request
jobs:
link-ticket:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check ticket name conforms to requirements
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "((apm|niad|AMB|PI|amp)-[0-9]+)|(dependabot\/)|(release\/)"
- 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, 'niad-') ||
contains(github.event.pull_request.head.ref, 'NIAD-') ||
contains(github.event.pull_request.head.ref, 'AMB-') ||
contains(github.event.pull_request.head.ref, 'AMP-') ||
contains(github.event.pull_request.head.ref, 'PI-')
run: |
echo "TICKET_NAME=$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(apm\|niad\|pi\)-[0-9]\+' | tr '[:lower:]' '[:upper:]')" >> $GITHUB_ENV
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Comment on PR
if: |
contains(github.event.pull_request.head.ref, 'apm-') ||
contains(github.event.pull_request.head.ref, 'APM-') ||
contains(github.event.pull_request.head.ref, 'niad-') ||
contains(github.event.pull_request.head.ref, 'NIAD-') ||
contains(github.event.pull_request.head.ref, 'AMB-') ||
contains(github.event.pull_request.head.ref, 'AMP-') ||
contains(github.event.pull_request.head.ref, 'PI-')
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:
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})