summaryrefslogtreecommitdiff
path: root/tools/verifygitlog.py
AgeCommit message (Collapse)Author
2025-05-15tools/verifygitlog.py: Allow long co-author and sign-off names.Daniël van de Giessen
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
2025-05-15tools/verifygitlog.py: Disallow a leading slash in commit subject line.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-05-12tools/verifygitlog.py: Apply stricter rules on git subject line.Damien George
There is a bit of ambiguity as to how the prefix of the git subject line should look like. Eg `py/vm: ...` vs `py/vm.c: ...` (whether the extension should be there or not). This commit makes the existing CI check of the git commit message stricter, by applying extra rules to the prefix, the bit before the : in the subject line. It now checks that the subject prefix: - doesn't start with unwanted bits: ., /, ports/ - doesn't have an extension: .c, .h, .cpp, .js, .rst or .md Full error messages are given when a rule does not pass. This helps to reduce maintainer burden by applying stricter rules, to keep the git commit history consistent. Signed-off-by: Damien George <damien@micropython.org>
2024-12-23tools/verifygitlog.py: Show invalid commit subjects in quotes.Alessandro Gatti
If a commit subject line has any trailing whitespace it won't match the repository validation rules, and the line will show up as part of the relevant error message. However, since there's no quotation marks around the offending text, the trailing whitespace may go unnoticed, and given that the commit message is then discarded when the commit operation is retried this can get fairly annoying. This commit simply modifies the error output for invalid subject lines to add quotation marks around the offending text, so trailing whitespace is much easier to see. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2023-05-08CODECONVENTIONS: Require that commits be signed-off by the author.Damien George
And use "must" instead of "should" where appropriate in related text. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27all: Fix spelling mistakes based on codespell check.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-10-07tools/verifygitlog.py: Add additional help for subject line issues.Jim Mussared
This check used to just show the regular expression that failed to match, but the rules are pretty subtle and hard to interpret from the regular expression alone. Add some basic checks for the main things that go wrong: - Missing capitalisation. - Missing full-stop. - Missing path. - Single-word subject. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-07tools/verifygitlog.py: Ignore comment lines in commit messages.Jim Mussared
The "signed-off" check assumes that the Signed-off-by: line is the last, but there may me many lines of comments after this. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-04tools: Add pre-commit support.Angus Gratton
Tweak the existing codeformat.py and verifygitlog.py to allow them to be easily called by pre-commit. (This turned out to be easier than using any existing pre-commit hooks, without making subtle changes in the formatting.) This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2022-02-18tools/verifygitlog.py: Ignore line length in body if it's a URL.David Lechner
This changes the git commit message line length check to ignore lines that contain URLs, since these cannot be wrapped without breaking tools that detect URLs and create a link. Signed-off-by: David Lechner <david@pybricks.com>
2021-02-21tools/verifygitlog.py: Show required format regexp in error message.iTitou
Signed-off-by: iTitou <moiandme@gmail.com>
2021-01-30tools/verifygitlog.py: Add script for verifying commit message format.stijn
The main rules enforced are: - At most 72 characters in the subject line, with a ": " in it. - At most 75 characters per line in the body. - No "noreply" email addresses.