Zulip Chat Archive

Stream: mathlib4

Topic: doc or docs? Consistency in commit messages


Kevin Buzzard (Nov 16 2024 at 16:08):

buzzard@buster:~/lean-projects/mathlib$ git log | grep "docs(" | wc
     42     279    2955
buzzard@buster:~/lean-projects/mathlib$ git log | grep "doc(" | wc
    121     769    8381
buzzard@buster:~/lean-projects/mathlib$

Apparently 42 mathlib commits are of the form docs(Computability/NFA) (#6467) and 121 are of the form doc(Topology/Homeomorph): two docstrings (#7595). Do we care about sticking to one convention for commit messages, and if so can we get CI to check for it?

Julian Berman (Nov 16 2024 at 16:11):

(https://github.com/conventional-changelog/commitlint is a widely used commit linter if the answer is someone cares. It doesn't do anything to retroactively 'fix' anything existing clearly.)

Damiano Testa (Nov 16 2024 at 16:13):

I thought that there was a CI step that checked something about how PR names begun, but maybe it is not on Mathlib, but on a dependency?

Damiano Testa (Nov 16 2024 at 16:17):

Ah, it is core itself that has this: https://github.com/leanprover/lean4/blob/master/.github/workflows/pr-title.yml.

Ruben Van de Velde (Nov 16 2024 at 16:23):

I'd already be happy if we managed to update the commit message when we change what a pr is doing :)

Damiano Testa (Nov 16 2024 at 16:42):

Now that there is a little bit of automation around summarizing PRs, it may be a fun experiment to see whether a bot can categorise PRs as feat, doc, or chore.

Damiano Testa (Nov 16 2024 at 16:43):

Just looking at the change in declarations may already give a good heuristic.

Kevin Buzzard (Nov 16 2024 at 17:39):

I was wondering about something far more basic -- checking whether the commit message began with one of the allowable strings, rather than guessing which one

Damiano Testa (Nov 16 2024 at 17:42):

Yes, I think that the CI step that I linked to above does exactly that, for core.

Michael Rothgang (Nov 16 2024 at 22:31):

Kevin Buzzard said:

I was wondering about something far more basic -- checking whether the commit message began with one of the allowable strings, rather than guessing which one

#16303 does that (and more --- I'm happy to extract just that subset, if desired). At the moment, it's not so clear to me if the PR is considered useful, so your opinion is valuable!


Last updated: May 02 2025 at 03:31 UTC