-
Notifications
You must be signed in to change notification settings - Fork 12
Lint commits in CI #115
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
Lint commits in CI #115
Conversation
We've been using the above syntax (from QEMU), that is |
Shell seems ok for now. I'm a bit concerned with the checkout as QEMU history is quite large (and that the public CI runners are deadly slow :-)). It is ok for now, but would it be possible to only query the log messages for all the PR commits rather than the full code base? I guess it cannot be done with |
I think we could set an upper bound and hope that no PR goes over, say, 100 commits. The commit hashes might be wrong in the error messages though. |
Maybe it is possible to get the origin/destination branch (through Git Hub API) and use the git CLI to retrieve the info. It guess that for now, it is nevertheless far better than having no lint at all, so let's merge it and we could improve it later. |
Note: we will need some escape/bypass mechanism, such as for #116 |
I think committers should be able to click merge even when this job fails if they know it's okay |
Alright, I changed the format to `[ot] path/name: component: description' but left the git checkout the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0c40cda
to
c840a05
Compare
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
This PR adds a script which lints commit messages for the title format and the signed-off-by line.
I'm not sure I've gotten the title format correct. Is it:
[ot] hw/opentitan: description
?Or is there an extra part for the IP block that was changed?
[ot] hw/opentitan: ot_hmac: description
If this shell script is too unreadable I don't mind it moving to Python, it's just that I don't know Python...
Fixes #1 and fixes #2