Skip to content

STY: Accept three-letter prefix for maintenance commits #56

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

jhlegarreta
Copy link
Contributor

@jhlegarreta jhlegarreta commented May 21, 2025

Accept three-letter prefix for maintenance commits: accept MNT:

Take advantage of the commit to specify that commit messages should also be prefixed and that changes in a commit should serve a coherent purpose.

@jhlegarreta jhlegarreta marked this pull request as ready for review May 21, 2025 13:12
@jhlegarreta
Copy link
Contributor Author

I am in two minds about this, but @effigies seems to have opted for this lately, although prefixes (e.g. chore) that are adopted in the JS community have also been used across PRs.

@effigies
Copy link
Member

The reference for chore/etc is: https://www.conventionalcommits.org/en/v1.0.0/

It's hard for me to remember different conventions for commits across different repositories. It's easier to adjust the PR prefix on submission. Maybe we can mention both, as both are readable, and make the point that each commit should do one thing and be tagged appropriately?

@jhlegarreta
Copy link
Contributor Author

It's hard for me to remember different conventions for commits across different repositories.

I share the feeling; I have used commitizen in another project to partially automate the commit prefixes. Other tool names such as husky or commitlint appear in a quick search. All seem to use the conventionalcommit conventions.

Maybe we can mention both, as both are readable, and make the point that each commit should do one thing and be tagged appropriately?

Until we have the bandwidth to try and adopt one of these, the suggestion seems reasonable.

Accept three-letter prefix for maintenance commits: accept `MNT`:
- Less typing; still readable
- All other prefixes are three-letter prefixes except for `CI`
- There has been a slight shift towards `MNT` lately, e.g.
  https://github.com/nipreps/fmriprep/blob/f3464b5cd4991042be18d131cbf3ed9c8dd413d9/CHANGES.rst?plain=1#L65;
  https://github.com/nipreps/smriprep/blob/b839befd008e02f329c59aa634583a18e4049829/CHANGES.rst?plain=1#L31;
  https://github.com/nipreps/nireports/blob/968d98f7774fafbc745f9d5eb73b40d1e7be4e4c/CHANGES.rst?plain=1#L34;
  https://github.com/nipreps/sdcflows/blob/b4a01f6e2071a538896e228cba9a43c10b8256cb/CHANGES.rst?plain=1#L34

Take advantage of the commit to specify that commit messages should also
be prefixed and that changes in a commit should serve a coherent purpose.
@jhlegarreta jhlegarreta force-pushed the AdoptThreeLetterMaintPrefix branch from 0a46a47 to 2f8e67f Compare May 21, 2025 22:49
@jhlegarreta jhlegarreta changed the title STY: Adopt three-letter prefix for maintenance commits STY: Accept three-letter prefix for maintenance commits May 21, 2025
@effigies effigies merged commit 2aa2663 into nipreps:mkdocs May 27, 2025
1 of 2 checks passed
@jhlegarreta jhlegarreta deleted the AdoptThreeLetterMaintPrefix branch May 27, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants