From 4a6aca848d1c0c5690f3a39b49f516cc128bd2bb Mon Sep 17 00:00:00 2001 From: Evolt DevOps team Date: Wed, 25 Mar 2026 12:45:38 +0000 Subject: [PATCH] EINT-26 Ensure PR title contains ticket ID (#9) --- .github/workflows/check-pr-title.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check-pr-title.yaml diff --git a/.github/workflows/check-pr-title.yaml b/.github/workflows/check-pr-title.yaml new file mode 100644 index 0000000..54d54f4 --- /dev/null +++ b/.github/workflows/check-pr-title.yaml @@ -0,0 +1,22 @@ +name: check-pr-title + +on: + pull_request: + branches: + - main + - develop + +jobs: + check-title: + runs-on: ubuntu-latest + steps: + - name: Validate PR title + env: + TITLE: ${{ github.event.pull_request.title }} + run: | + echo "PR Title: ${TITLE}" + if [[ ! "${TITLE}" =~ [A-Z]+-[0-9]+ ]] + then + echo "❌ PR title must include a ticket ID (e.g. PROJ-123)" + exit 1 + fi