Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/pr_title_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ jobs:
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot)\].*-.*$ ]]; then
echo "PR title contains ticket or dependabot reference."
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-0000)\].*-.*$ ]]; then
Comment thread
JackSpagnoliNHS marked this conversation as resolved.
echo "PR title uses AEA-0000 placeholder. Please use 'adhoc' instead of 'AEA-0000' for adhoc changes."
exit 1
fi

if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot|adhoc)\].*-.*$ ]]; then
echo "PR title contains ticket reference, was raised by dependabot or is an adhoc change."
else
echo "PR title does not contain ticket or dependabot reference."
echo "PR title does not contain ticket reference or 'adhoc' label."
exit 1
fi

Expand All @@ -42,7 +47,7 @@ jobs:
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot)\].*-.*$ ]]; then
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot|adhoc)\].*-.*$ ]]; then
TICKET_REF="${BASH_REMATCH[1]}"
echo "Extracted ticket reference: $TICKET_REF"
echo "TICKET_REF=$TICKET_REF" > "$GITHUB_OUTPUT"
Expand Down