-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Squash merge messages contain information about all commits by default. #35247
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
base: main
Are you sure you want to change the base?
Conversation
fca67b7
to
d328e00
Compare
Please split And it needs tests to cover the changed logic (although old code doesn't have enough tests, new code should have when the logic is complex) |
Let me spend some time researching how to add tests. |
* main: [skip ci] Updated translations via Crowdin Fix LFS range size header response (go-gitea#35277) Skip "parentsigned" check when the repo is empty (go-gitea#35292) [skip ci] Updated translations via Crowdin Fix GitHub release assets URL validation (go-gitea#35287) nix flake use go1.25 (go-gitea#35288) go1.25.0 (go-gitea#35262)
commitsBuilder := strings.Builder{} | ||
for _, c := range compareInfo.Commits { | ||
commitsBuilder.WriteString("* ") | ||
commitsBuilder.WriteString(c.CommitMessage) |
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.
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.
In this case, I would consider it an abuse of commit messages. I believe that squash merge should be an independent feature branch, and I find it hard to believe that every commit message contains so much information. Therefore, I consider this to be an extreme scenario.
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.
I’ve submitted f37de47 to address the issue. This isn’t an uncommon case—many commits include multi-line messages. Do you know how GitHub handles this?
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.
ref: hiifong/squash-test@beaa913
GitHub's squash merge does not include the PR description, and there seems to be no limit on the length of the commit message.

This behavior is basically the same as GitHub, except for the dividing line I added.
screenshot: