-
Notifications
You must be signed in to change notification settings - Fork 101
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
Parsing git message trailers #377
Comments
Currently we only have 1 meta rule (denoted by rule ids starting with If I understand correctly, @webknjaz I think what you’re proposing here is different though. I believe you’re suggesting has 2 distinct parts:
[trailer-match-regex]
key=Co-Authored-By
regex=^Dependabot
# Named Rules can be used to have multiple of these trailer-match-regex rules
[trailer-match-regex:SignedOffBy]
key=Signed-off-by
regex=^Dependabot
# Perhaps we need an extra option 'trailer-required' to indicate the behavior when the trailer is not present
[trailer-match-regex:SignedOffByRequired]
trailer-required=true # hard fail when no Signed-off-by trailer is present
trailer-required=false # skip rule if no Signed-off-by trailer is present
key=Signed-off-by
regex=^Dependabot |
Sounds about right, except I was specifically thinking about the metadata that can be interpreted as contributors. For example, GitHub and other Git hostings show everybody listed in the built-in Author and Committer fields, along with all the entries of
|
Interesting use-case, I can definitely see the usefulness of this. I'm not sure whether it would be better to implement this as a new rule though, rather than overloading the existing one with a new meaning/behavior. In order for this to happen, gitlint would also need capture the Committer information, only the Author information (as it does today). To summarize for when we'd get around to implement this, there's a bunch of work suggested here:
I think it makes sense to split these out into separate issues once we start work on this. |
Originally posted by @webknjaz in #373 (comment)
The text was updated successfully, but these errors were encountered: