diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..7a7ee5e --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,19 @@ +name: PR Title +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +permissions: + pull-requests: read # Read PR details + contents: read # Read repository content + +jobs: + conventional-commits: + timeout-minutes: 5 + name: conventional-commits + runs-on: ubuntu-24.04 + steps: + - uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 + with: + task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert","style","build"]' + add_label: 'false' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d458adc..878bbf6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,25 @@ For questions or support, email . +## Pull requests + +PR titles **must** follow [Conventional Commits](https://www.conventionalcommits.org/) format: + +``` +type(optional scope): description +``` + +Allowed types: `feat`, `fix`, `docs`, `test`, `ci`, `refactor`, `perf`, `chore`, `revert`, `style`, `build`. + +Examples: + +``` +feat: add wallet balance endpoint +fix(auth): handle expired tokens +chore: update dependencies +``` + +A CI check will block merge if the PR title does not match this format. ### Code style & formatting