ruleset:
- name: "Conventional Commit Format"
when:
- "pull_request.opened"
- "pull_request.edited"
- "pull_request.synchronize"
validate:
- type: "title"
match: "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(\\w+\\))?: .+"
message: "PR title must follow conventional commit format: type(scope): description"
- type: "commit"
match: "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(\\w+\\))?: .+"
message: "All commits must follow conventional commit format"
ignore_merge_commits: true
on_success:
- label:
add: ["conventional-format"]
on_failure:
- comment:
body: |
## Invalid Commit Format
Please format your title and commits according to the Conventional Commits specification:
```
<type>(<optional scope>): <description>
[optional body]
[optional footer(s)]
```
Where `type` is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Example: `feat(user): add login functionality`
{{ validation_summary }}