emacs-citar / citar

Emacs package to quickly find and act on bibliographic references, and edit org, markdown, and latex academic documents.
GNU General Public License v3.0
502 stars 54 forks source link

Adopt conventional commit guidelines #749

Closed bdarcus closed 1 year ago

bdarcus commented 1 year ago

Use conventional commits

In order to have a more useful commit history, we really need to consistently use conventional commits. I've been terrible at this, and the related issue of keeping a changelog up-to-date!

Given the long history here, which is a mess (most of it does not conform to conventional commits conventions), we can't fix this retrospectively, as it would rewrite history, and so break things.

But we could start the change from now going forward.

Automate this for changelogs, version bumps

I have a feeling cocgitto would be a better option than some of the npm-based ones, since it handles much more than just changelogs to ensure compliance with "conventional commit" guidelines, such as:

It's also a single rust binary.

I've installed the hooks locally, and will be using it for for my commits, to see if I can clean things up going forward.

EDIT: I do realize there are some limitations to the commit and bump functionality of cog; most notably that it doesn't seem to work well with signed commits.

Possible Plan

An easy approach would thus be to add a cog.toml file to the repo with correct changelog config, plus a pre-commit hook to change the version number of the main file before auto bumping.

Can then encourage contributors to use the same, though they wouldn't have to (could do the commit messages manually).

That should clean up the history going forward, and ensure a changelog that is useful and up-to-date.

Originally posted by @bdarcus in https://github.com/emacs-citar/citar/issues/632#issuecomment-1472443209

bdarcus commented 1 year ago

I just started doing it.