-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Use GitHub-style commit message for squash merge #35987
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
tests/integration/pull_merge_test.go
Outdated
| expectedMessage: `* Refactor user service | ||
| Implement the login endpoint. | ||
| Validate request body. | ||
| * Add email notification service | ||
| Implements a new email notification module. | ||
| - Supports templating | ||
| - Supports HTML and plain text modes | ||
| - Includes retry logic |
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.
Is it really a good result?
* Refactor user service
...
- Supports templating
* (others...)
Not sure whether GitHub does so. Even if GitHub does so, I don't think GitHub was right or we need to blindly follow GitHub
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.
Sorry, I don't quite understand where the problem is. We add * before every commit message and - comes from the commit message content.
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.
For example:
commit1:
a
* a
* c
commit2:
x
* y
* z
The current code generates:
* a
* b
* c
* x
* y
* z
It looks like there are 6 commits.
But ideally it should be:
* a
* b
* c
* x
* y
* z
Just my opinion.
|
What's the difference of " Squash merge messages contain information about all commits by default. #35247 " ? Why 35247 seems more complex and changed more code. |
Gitea already supports including the commit messages of all commits for squash merge in #16134 and this behavior is controlled by the |
This PR modifies the commit message format for squash merge to match GitHub's style.
Screenshots
Before:
After:
GitHub: