diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml new file mode 100644 index 0000000..f910f11 --- /dev/null +++ b/.github/workflows/lint-pr-title.yml @@ -0,0 +1,31 @@ +name: lint-pr-title + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + pull-requests: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + chore + docs + refactor + test + ci + perf + build + requireScope: false + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The PR title subject must start with a lowercase letter. diff --git a/README.md b/README.md index c3be6b3..47dc18f 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,23 @@ case-study/ └── metrics-guide.md # Impact metrics discovery, analytics MCP ``` +## Contributing + +Releases are automated by [release-please](https://github.com/googleapis/release-please), which derives the next version from [Conventional Commits](https://www.conventionalcommits.org/). The commit message (or PR title, if you squash-merge) determines the bump: + +| Prefix | Example | Effect | +|---|---|---| +| `fix:` | `fix: handle empty diff in design-engineer mode` | patch (1.4.1 → 1.4.2) | +| `feat:` | `feat: add metrics-guide reference` | minor (1.4.1 → 1.5.0) | +| `feat!:` or `BREAKING CHANGE:` in body | `feat!: rename SKILL.md frontmatter` | major (1.4.1 → 2.0.0) | +| `chore:`, `docs:`, `refactor:`, `test:`, `ci:` | `docs: clarify install step` | no release | + +Use the imperative mood ("add", not "added"). Keep the subject under ~72 chars; put rationale in the body. + +### Enforcement + +PR titles are linted by `.github/workflows/lint-pr-title.yml` — non-conforming titles block the merge. For direct pushes to `main`, write a conforming commit message; non-`feat`/`fix` commits are simply ignored by release-please rather than rejected. + ## Credits Built by [Jakub Salmik](https://jakubsalmik.com).