From 6f1d96fc2c3605c748a4851a7cf320c9284e1995 Mon Sep 17 00:00:00 2001 From: Krishna <161239575+DeathGun44@users.noreply.github.com> Date: Fri, 23 Jan 2026 01:13:33 +0530 Subject: [PATCH] FINERACT-2158: Add workflow to enforce PR title convention --- .github/workflows/pr-title-check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-title-check.yml diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml new file mode 100644 index 000000000..0256a09a1 --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,26 @@ +name: Fineract PR Compliance + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + pull-requests: read + +jobs: + verify-title: + name: Validate Jira Ticket ID + runs-on: ubuntu-latest + timeout-minutes: 1 + steps: + - name: Verify Title Format + run: | + title="${{ github.event.pull_request.title }}" + regex="^FINERACT-[0-9]+: " + + if [[ ! "$title" =~ $regex ]]; then + echo "::error::PR title '$title' is invalid." + echo "::error::It must start with a Jira Ticket ID (e.g., 'FINERACT-123: Description...')." + exit 1 + fi + echo "Success: PR title matches the required format."