diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 98186a54..c1a99446 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,5 +1,20 @@ # Contributing Guidelines -## Submitting a pull request +For the full contributing guide, see the +[Fresh documentation](https://fresh.deno.dev/docs/latest/contributing). -First, please be sure to ensure `deno task ok` is run and successfully passes. +## PR title format + +PR titles must be all lowercase and start with one of the following prefixes: + +- `feat:` - new features +- `fix:` - bug fixes +- `test:` - test additions or changes +- `chore:` - maintenance, refactoring, docs +- `ci:` - CI/CD changes + +Example: `feat: add middleware compilation` + +## Before submitting + +Run `deno task ok` and ensure it passes. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 885de7e7..feefa26b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,23 @@ on: branches: [main] jobs: + pr-title: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Validate PR title + env: + TITLE: ${{ github.event.pull_request.title }} + run: | + if ! echo "$TITLE" | grep -qP '^(feat|fix|test|chore|ci):'; then + echo "::error::PR title must start with feat:, fix:, test:, chore:, or ci:" + exit 1 + fi + if echo "$TITLE" | grep -qP '[A-Z]'; then + echo "::error::PR title must be all lowercase" + exit 1 + fi + test: runs-on: ${{ matrix.os }} timeout-minutes: 10