Skip to content

docs: add conventional commit guide and PR title examples #15638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions docs/source/contributor-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,29 @@ convention but encourage its use if you want your PR to feature in the correct s
The change log generator will also look at GitHub labels such as `bug`, `enhancement`, or `api change`, and labels
do take priority over the conventional commit approach, allowing maintainers to re-categorize PRs after they have been merged.

#### Commit Prefix Guide

| Prefix | Purpose |
|------------|-----------------------------------------|
| `feat:` | A new feature |
| `fix:` | A bug fix |
| `docs:` | Documentation only changes |
| `chore:` | Build process or auxiliary tool changes |
| `refactor:`| Code changes that neither fix nor add |
| `test:` | Adding or updating tests |

#### Example PR Titles

- `docs: update README with example usage`
- `fix: resolve crash on null input`
- `feat: add support for XYZ operator`
- `chore: update Cargo dependencies`

Using these formats helps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking on github labels actually solves the problem to identify the PR flavor but changelog sounds reasonable. But just having prefixes is not enough, we need to have PR title checker like we did in Comet https://github.com/apache/datafusion-comet/blob/main/.github/workflows/pr_title_check.yml

- Organize changelogs automatically
- Improve review clarity
- Maintain a clean project history

[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/

# Reviewing Pull Requests
Expand Down
Loading