Skip to content

Commit 218c5da

Browse files
blocks aea-0000
1 parent c4efd04 commit 218c5da

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/pr_title_check.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ jobs:
2929
env:
3030
PR_TITLE: ${{ github.event.pull_request.title }}
3131
run: |
32-
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot)\].*-.*$ ]]; then
33-
echo "PR title contains ticket or dependabot reference."
32+
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-0000)\].*-.*$ ]]; then
33+
echo "PR title uses AEA-0000 placeholder. Please use 'adhoc' instead of 'AEA-0000' for adhoc changes."
34+
exit 1
35+
fi
36+
37+
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot|adhoc)\].*-.*$ ]]; then
38+
echo "PR title contains ticket reference, was raised by dependabot or is an adhoc change."
3439
else
35-
echo "PR title does not contain ticket or dependabot reference."
40+
echo "PR title does not contain ticket reference, was not raised by dependabot, and is not an adhoc change."
3641
exit 1
3742
fi
3843
@@ -42,7 +47,7 @@ jobs:
4247
env:
4348
PR_TITLE: ${{ github.event.pull_request.title }}
4449
run: |
45-
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot)\].*-.*$ ]]; then
50+
if [[ "$PR_TITLE" =~ ^.*:.*\[([A-Z]+-[0-9]+|dependabot|adhoc)\].*-.*$ ]]; then
4651
TICKET_REF="${BASH_REMATCH[1]}"
4752
echo "Extracted ticket reference: $TICKET_REF"
4853
echo "TICKET_REF=$TICKET_REF" > "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)