From d6a08226a9dc4a0d58f94495801bd2886f7999a1 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Sun, 8 Feb 2026 23:51:30 +0530 Subject: [PATCH 1/8] feat: add PR title validation workflow - Introduced a GitHub Actions workflow to validate pull request titles against conventional commit standards. - The workflow triggers on PR events (opened, reopened, synchronized, edited) and provides feedback on title formatting. - Includes documentation for allowed title formats and examples to guide contributors in writing appropriate titles. --- .github/workflows/pr-title-check.yml | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 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 0000000..4d72b81 --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,70 @@ +name: PR Title Check + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - edited + +permissions: + pull-requests: write + +jobs: + validate-pr-title: + runs-on: ubuntu-slim + steps: + - name: Validate PR title + id: validate + uses: amannn/action-semantic-pull-request@v6.1.1 + continue-on-error: true + with: + # Default types from: https://github.com/commitizen/conventional-commit-types + requireScope: false + wip: true + + - name: Print Failure Documentation + if: steps.validate.outcome == 'failure' + run: | + echo "## ❌ PR Title Validation Failed" + echo "" + echo "**Current title:** \`${{ github.event.pull_request.title }}\`" + echo "" + echo "Use a conventional commit style so we can keep a clear history. Fix it like this:" + echo "" + echo "### 📋 Format" + echo "" + echo "\`type: description\` or \`type(scope): description\`" + echo "" + echo "### 🏷️ Allowed types" + echo "" + echo "| Type | Use for |" + echo "|----------|--------|" + echo "| feat | New feature or user-facing change |" + echo "| fix | Bug fix |" + echo "| docs | Documentation only |" + echo "| style | Formatting, no logic change |" + echo "| refactor | Code change (no new feature or bug fix) |" + echo "| perf | Performance improvement |" + echo "| test | Adding or updating tests |" + echo "| build | Build system or dependencies |" + echo "| ci | CI configuration |" + echo "| chore | Other (maintenance, tooling) |" + echo "" + echo "### 🎯 Examples" + echo "" + echo "- \`feat: add user authentication\`" + echo "- \`feat(api): add payment endpoint\`" + echo "- \`fix: resolve login timeout\`" + echo "- \`chore: update Python dependencies\`" + echo "" + echo "### ❌ Fix these mistakes" + echo "" + echo "- \`Add user login\` → \`feat: add user authentication\`" + echo "- \`Fixed the bug\` → \`fix: resolve checkout error\`" + echo "- \`feat:add feature\` → \`feat: add feature\` (space after colon)" + echo "" + echo "---" + echo "Edit the PR title and this check will re-run automatically." + exit 1 From f37331494298f5df6df0c1b7a98274340adc0f63 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Sun, 8 Feb 2026 23:54:51 +0530 Subject: [PATCH 2/8] chore: add GITHUB_TOKEN to PR title validation workflow - Updated the GitHub Actions workflow to include the GITHUB_TOKEN environment variable for improved authentication during PR title validation. --- .github/workflows/pr-title-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 4d72b81..0cac181 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -18,6 +18,8 @@ jobs: - name: Validate PR title id: validate uses: amannn/action-semantic-pull-request@v6.1.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true with: # Default types from: https://github.com/commitizen/conventional-commit-types From eaecb4f50fd89811f565ad4dbe11b99dca2576f5 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Sun, 8 Feb 2026 23:56:47 +0530 Subject: [PATCH 3/8] fix: improve PR title failure message formatting in workflow --- .github/workflows/pr-title-check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 0cac181..efdf60a 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -28,10 +28,12 @@ jobs: - name: Print Failure Documentation if: steps.validate.outcome == 'failure' + env: + PR_TITLE: ${{ github.event.pull_request.title }} run: | echo "## ❌ PR Title Validation Failed" echo "" - echo "**Current title:** \`${{ github.event.pull_request.title }}\`" + echo "**Current title:** \`$PR_TITLE\`" echo "" echo "Use a conventional commit style so we can keep a clear history. Fix it like this:" echo "" From ea4c5884c331905208f9b7ac34c30dd2894a14f5 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Mon, 9 Feb 2026 00:01:24 +0530 Subject: [PATCH 4/8] chore: update PR title check workflow permissions to include statuses --- .github/workflows/pr-title-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index efdf60a..19702bc 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -10,6 +10,7 @@ on: permissions: pull-requests: write + statuses: write jobs: validate-pr-title: From 3b889f3dac1b9bc05d2dc1c790a28d3681ec0c53 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Mon, 9 Feb 2026 00:05:08 +0530 Subject: [PATCH 5/8] chore: update CI workflow to ignore changes in the .github directory --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77b67e2..fcca56e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,11 @@ on: push: branches: - develop + paths-ignore: + - ".github/**" pull_request: + paths-ignore: + - ".github/**" concurrency: group: develop-forms_pro-${{ github.event.number }} From 7c1115e8f2456dc717f9a67ef16d4afdc4b74107 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Mon, 9 Feb 2026 00:07:11 +0530 Subject: [PATCH 6/8] chore: refine PR title validation workflow by removing unused permissions and options --- .github/workflows/pr-title-check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 19702bc..efeca07 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -10,7 +10,6 @@ on: permissions: pull-requests: write - statuses: write jobs: validate-pr-title: @@ -25,7 +24,6 @@ jobs: with: # Default types from: https://github.com/commitizen/conventional-commit-types requireScope: false - wip: true - name: Print Failure Documentation if: steps.validate.outcome == 'failure' From 6fe4e1be8cf641f628c65b369d84daa85c23ab84 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Mon, 9 Feb 2026 00:11:16 +0530 Subject: [PATCH 7/8] chore: enhance PR title validation workflow by adding 'wip' option --- .github/workflows/pr-title-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index efeca07..a348a55 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -24,6 +24,8 @@ jobs: with: # Default types from: https://github.com/commitizen/conventional-commit-types requireScope: false + wip: false + - name: Print Failure Documentation if: steps.validate.outcome == 'failure' From 8ebd82edd583b6c64a3ddcfe4636984fcf8cbc85 Mon Sep 17 00:00:00 2001 From: Harsh Tandiya Date: Mon, 9 Feb 2026 00:11:49 +0530 Subject: [PATCH 8/8] chore: update linter workflow to ignore changes in the .github directory --- .github/workflows/linter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 4422bee..f432fef 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -2,6 +2,8 @@ name: Linters on: pull_request: + paths-ignore: + - ".github/**" workflow_dispatch: permissions: