Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR Title

on:
pull_request_target:
types: [opened, edited, synchronize]

permissions:
pull-requests: read

jobs:
validate:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
subjectPattern: ^[a-z].+$
subjectPatternError: "The subject must start with a lowercase letter: '{subject}'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: bruits/sampo/crates/sampo-github-action@main
with:
command: auto
pr-title: "chore(release): bump versions and changelogs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
26 changes: 20 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,28 @@ This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formattin
- Keep functions focused and small
- Add docstrings to public functions and classes

### Commit Messages
### PR Titles

Please use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716).
For the scope, you can also mention the package names.
Use clear, descriptive commit messages that explain the "why" behind the change.
Since all branches are squash-merged, the **PR title becomes the commit message** on `main`. PR titles are validated by CI using [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) format:

These commit conventions are generally most important on commits to main.
All branch commits get squash-merged.
```
type(scope): subject
```

- **type** (required): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
- **scope** (optional): package name or area, e.g. `feat(generaltranslation): add new method`
- **subject** (required): lowercase start, describes the "why" behind the change

Examples:

```
feat: add batch translation support
fix(generaltranslation): handle empty input gracefully
chore: update dependencies
docs: clarify setup instructions
```

Individual commit messages on feature branches are not enforced, but following the same convention is encouraged.

## Join The Project Team

Expand Down