Upgrade: [dependabot] - bump boto3 from 1.35.60 to 1.35.63 #484
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Link ticket | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
link-ticket: | |
runs-on: ubuntu-latest | |
env: | |
REF: ${{ github.event.pull_request.head.ref }} | |
steps: | |
- name: Check ticket name conforms to requirements | |
run: echo "$REF" | grep -i -E -q "(aea-[0-9]+)|(apm-[0-9]+)|(apmspii-[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, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || 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-') | |
continue-on-error: true | |
run: | | |
# Match ticket name patterns | |
REGEX=' | |
(aea-[0-9]+)| | |
(apm-[0-9]+)| | |
(apmspii-[0-9]+)| | |
(adz-[0-9]+)| | |
(amb-[0-9]+) | |
' | |
# Remove whitespace and newlines from the regex | |
REGEX=$(echo "$REGEX" | tr -d '[:space:]') | |
# Extract the ticket name and convert to uppercase | |
TICKET_NAME=$(echo "$REF" | grep -i -E -o "$REGEX" | tr '[:lower:]' '[:upper:]') | |
# Set the environment variable | |
echo "TICKET_NAME=$TICKET_NAME" >> "$GITHUB_ENV" | |
- name: Comment on PR with link to JIRA ticket | |
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || 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-') | |
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: | |
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }}) |