From f2cfa6fd9d0ec59f635dfc11cdc5a37769641ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Gr=C3=B8ndahl?= Date: Tue, 10 Mar 2026 22:52:05 +0000 Subject: [PATCH] ci: add PR quality workflow for conventional commit title validation Closes #28 --- .github/workflows/pr-quality.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/pr-quality.yml diff --git a/.github/workflows/pr-quality.yml b/.github/workflows/pr-quality.yml new file mode 100644 index 0000000..f229a7b --- /dev/null +++ b/.github/workflows/pr-quality.yml @@ -0,0 +1,42 @@ +name: PR Quality Checks + +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + validate-title: + name: Validate PR Title + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - name: Check PR title follows Conventional Commit format + uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Configure allowed types (based on conventional commits) + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + # Don't require a scope (e.g., "feat(): ...") + requireScope: false + # Don't allow subject to start with uppercase letter + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The subject (description) should start with a lowercase letter. + Example: "feat(api): add new endpoint" (not "feat(api): Add new endpoint")