fix(pull): preserve squash message trailers and additional commit messages#37954
Merged
Conversation
…sages When a PR description already ends with git trailers (e.g. Issue: X, Signed-off-by:), the co-author separator line (---------) was still inserted before the Co-authored-by lines, breaking the trailer block. messageHasTrailers now skips the separator so co-authors are appended directly into the existing trailer block. In PR-description mode (PopulateSquashCommentWithCommitMessages=false), commit messages beyond the oldest were silently dropped. They are now appended as bullet points after the PR description, consistent with the commit-message mode format. The commit-message loop is extracted into formatSquashMergeCommitMessages. Callers that want to skip the oldest commit pass a trimmed slice (commits[:max(0, len(commits)-1)]) instead of a skipFirst bool flag. Co-Authored-By: Nicolas <nicolas@bircks.eu> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wxiaoguang
reviewed
May 31, 2026
wxiaoguang
reviewed
May 31, 2026
wxiaoguang
reviewed
May 31, 2026
wxiaoguang
reviewed
May 31, 2026
Contributor
|
I would say half of the changed code is AI garbage, do you agree? |
wxiaoguang
reviewed
May 31, 2026
# Conflicts: # services/pull/pull.go
Contributor
|
OK, rewritten. And that's why I introduced |
Contributor
|
By the way, if you are a new contributor and not familiar with the code base, it's fine to just submit the AI PRs. But I think you have been working on the code base for a long time and is an active maintainer, so I think you should pay more attention to the logic, fully understand the problem, carefully design, and avoid AI hallucination. I really don't have time to keep fixing the AI slop. |
wxiaoguang
approved these changes
Jun 15, 2026
lunny
approved these changes
Jun 15, 2026
Member
Author
|
Sorry just did not have the time yet to continue and fix - will do it better |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.