Skip to content
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

chore: Enforce conventional commit PR title #3083

Merged
merged 10 commits into from
Nov 23, 2022

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Nov 4, 2022

Description

Forces PR titles to follow the "conventional commit" specification.

Currently, mergify will set the PR title as the commit message when squashing:

{{ title }} (#{{ number }})

Based on the commit message, we can use tools like release-please to automatically generate changelogs and bump versions. Enforcing those rules brings us one step closer to that.

I choose the following set of prefixes:

  • fix: A bugfix, resulting in a semver patch bump
  • feat: A feature, resulting in a semver minor bump
  • deps: Dependabot updates

Only these represent "releasable units" for release-please.

  • refactor: Useful to indicate that a PR is a pure refactoring and should not change functionality
  • docs: Documentation update only
  • chore: Anything else

Fixes #3054.

Links to any relevant issues

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Codifying instead of documenting this is perfect!

.github/mergify.yml Outdated Show resolved Hide resolved
Co-authored-by: Elena Frank <elena.frank@protonmail.com>
Copy link
Contributor

@elenaf9 elenaf9 left a comment

Choose a reason for hiding this comment

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

Nice!

.github/mergify.yml Outdated Show resolved Hide resolved
@mxinden mxinden merged commit 611286b into master Nov 23, 2022
mxinden added a commit that referenced this pull request Nov 24, 2022
mxinden added a commit that referenced this pull request Nov 24, 2022
Revert "chore: Enforce conventional commit PR title (#3083)"

This reverts commit 611286b.
mergify bot pushed a commit that referenced this pull request Dec 13, 2022
…#3204)

As per decision in #3083, we want to use the conventional commits in our repository. To make sure this actually happens, this patch adds a workflow that validates PR titles to follow this convention. Together with our mergify configuration, these PR titles end up being the commit message title when squash-merging a pull request.

Related: #3083
Related: libp2p/github-mgmt#93
@thomaseizinger thomaseizinger deleted the enforce-conventional-commits branch February 24, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decision required: Change commit messages to "conventional commits"
3 participants