[ https://issues.apache.org/jira/browse/KAFKA-18792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936903#comment-17936903 ]
David Arthur edited comment on KAFKA-18792 at 3/19/25 6:35 PM: --------------------------------------------------------------- Yes I think that makes sense [~mimaison]. "Co-authored-by:" is a git trailer which is basically like an email footer. Our "Reviewers:" is also a trailer. We do some trailer validation already to check for "Reviewers", so it would be easy to add/verify "Co-authored-by". We'll need to experiment to see what happens with a PR has multiple authors. Today, GitHub is adding "Co-authored-by" to the pre-filled commit message when we click "Squash and Merge". I'm not sure if the same happens when adding to the merge queue. — BTW, related to this, I would like to move us towards using these structured trailers a bit more. * Reviewed-by: anyone who left feedback on the PR * Approved-by: committers who approved the PR * Helped-by: shout-outs for inspiration or significant help * Signed-off-by: commit signatory * Fixes: KAFKA-12345 * References: KIP-123, KAFKA-23456 * etc This would help us get away from putting metadata into our commit subjects which will make the log a bit nicer looking. "git log" has options for formatting trailers, so we can still easily generate a changelog like {code:java} KAFKA-12345 Something happened KAFKA-23456 Another thing {code} was (Author: davidarthur): Yes I think that makes sense [~mimaison]. "Co-authored-by:" is a git trailer which is basically like an email footer. Our "Reviewers:" is also a trailer. We do some trailer validation already to check for "Reviewers", so it would be easy to add/verify "Co-authored-by". We'll need to experiment to see what happens with a PR has multiple authors. Today, GitHub is adding "Co-authored-by" to the pre-filled commit message when we click "Squash and Merge". I'm not sure if the same happens when adding to the merge queue. --- BTW, related to this, I would like to move us towards using these structured trailers a bit more. * Reviewed-by: anyone who left feedback on the PR * Approved-by: committers who approved the PR * Helped-by: shout-outs for inspiration or significant help * Signed-off-by: commit signatory * Fixes: KAFKA-12345 * References: KIP-123, KAFKA-23456 * etc > Enforce uniform PR structure for merge queue > -------------------------------------------- > > Key: KAFKA-18792 > URL: https://issues.apache.org/jira/browse/KAFKA-18792 > Project: Kafka > Issue Type: Sub-task > Components: build > Reporter: David Arthur > Priority: Major > > Since the merge queue will use the repo's default commit message, we cannot > customize the commit when adding to the queue. Instead, we will use the PR > title and body as the commit message and subject (KAFKA-18791). > > In order to ensure well-formed commits, we will need a GitHub Action to > validate the PR title and PR body. > > Specifically, we should have the following checks: > * PR title includes KAFKA-XXXXX, MINOR, or HOTFIX > * PR title is less than 120 characters > * PR title is not automatically truncated by GitHub (ending in ...) > * PR body includes "Reviewers:" line -- This message was sent by Atlassian Jira (v8.20.10#820010)