-
Notifications
You must be signed in to change notification settings - Fork 783
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
[ci] Lint for "origin" lines in commit messages #25291
base: earlgrey_1.0.0
Are you sure you want to change the base?
Conversation
6970d0b
to
93db72c
Compare
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 technically, though please hold off with merging until all TZs have had a chance to read the announcement email and reply in case of concerns.
Thanks @jwnrt!
I would voice the opinion that having a special commit message for commit messages that originate on the
Also what value does it provide? I understand the value of the |
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.
Let's provide an automation for the (commit is original ..
message on the dev side; please hold off until then. I'll follow up offline
Thanks @jwnrt @andreaskurth; I discussed offline with @andreaskurth : I am OK with the commit message if there is a way for a git hook to automatically apply it based on what branch I am working on. Specifically, I am also OK if the target branch needs to be specified on the command line once per branch I create, e.g.,
|
93db72c
to
d58aec9
Compare
This hook adds the `(commit is original to earlgrey_1.0.0)` line to commit messages if the current branch is descended from `earlgrey_1.0.0` and does not already have a `(cherry picked from commit ...)` line. Signed-off-by: James Wainwright <[email protected]> (commit is original to earlgrey_1.0.0)
This line indicates whether a commit is original to this branch or was cherry-picked from another. Signed-off-by: James Wainwright <[email protected]> (commit is original to earlgrey_1.0.0) (commit is original to earlgrey_1.0.0)
d58aec9
to
a6bf628
Compare
I've added a commit hook. Instead of requiring an extra config step, it looks to see if the current branch is a descendent of |
awesome, thanks @jwnrt ! |
This line indicates whether a commit is original to this branch or was cherry-picked from another.
It should be either:
(commit is original to earlgrey_1.0.0)
(cherry picked from commit <SHA>)
You can see the lint running here:
https://github.com/jwnrt/opentitan/actions/runs/11952913061/job/33319695210?pr=31
This PR also includes a commit hook for adding the "original" line in
util/git/hooks/prepare-commit-msg
.