Gerrit only: Renovate doesn't properly allow specifying commit trailers through the commitBody
config
#33306
Unanswered
travisshivers
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Gerrit, 39.82.3
Please tell us more about your question or problem
The commitBody configuration seems like it is designed to be able to specify commit trailers in it since renovate even has a gitSignOff preset which should add the
"Signed-off-by: {{{gitAuthor}}}"
trailer.Git trailers follow specific requirements and need to be the last block of a commit message for them to actually be trailers. https://git-scm.com/docs/git-interpret-trailers
Renovate appears to properly handle this for all cases except for gerrit since it needs to insert some other trailers
renovate/lib/modules/platform/gerrit/scm.ts
Lines 118 to 121 in 8d31e5c
Renovate adds these internal trailers as the last entry to
commit.message
array which simple-git then converts to a single string by joining them with two line breaks between them.This ultimately means that renovate can't be configured to add on additional git trailers when using gerrit.
Example:
Renovate config
Ultimate gerrit commit message:
In the commit message above, we can see that
My-Trailer
will not be interpreted as a trailer because it is not in the last group of lines.One potential fix might be to append these renovate generated trailers to the last element of
message
ifmessage
has more than one element.Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions