Allow disable pr body as commit message when squash merge #7351

Closed
opened 2025-11-02 07:23:40 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @viceice on GitHub (May 18, 2021).

  • Gitea version (or commit ref): 1.14.2
  • Git version: official gitea docker image from above
  • Operating system: official gitea docker (kubernetes helm)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

PR #13071 added the pr body to the squash commit message. I like to have an option to disable this behavior.
I'm using renovate to manage my dependencies and always squash my PR's.
The renovate PR descriptions can be very long because of changelogs, so i would like to exclude the content as i can do for commits with:

[repository.pull-request]
DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT=0

I would be happy to help to add such an option if it is welcome. 🙃

Screenshots

image

Originally created by @viceice on GitHub (May 18, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.14.2 - Git version: official gitea docker image from above - Operating system: official gitea docker (kubernetes helm) <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> PR #13071 added the pr body to the squash commit message. I like to have an option to disable this behavior. I'm using [renovate](/renovatebot/renovate) to manage my dependencies and always squash my PR's. The renovate PR descriptions can be very long because of changelogs, so i would like to exclude the content as i can do for commits with: ```ini [repository.pull-request] DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT=0 ``` I would be happy to help to add such an option if it is welcome. 🙃 ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/1798109/118615033-9bc64c00-b7c0-11eb-9904-4f69ea8bf4a8.png)
GiteaMirror added the type/bug label 2025-11-02 07:23:40 -06:00
Author
Owner

@viceice commented on GitHub (May 18, 2021):

I think it should repect DEFAULT_MERGE_MESSAGE_SIZE=0 here:
1da0d156bc/services/pull/pull.go (L573-L577)

@viceice commented on GitHub (May 18, 2021): I think it should repect `DEFAULT_MERGE_MESSAGE_SIZE=0` here: https://github.com/go-gitea/gitea/blob/1da0d156bc335d01f6ce99aa41d2b8d9677bdbbc/services/pull/pull.go#L573-L577
Author
Owner

@stale[bot] commented on GitHub (Jul 21, 2021):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jul 21, 2021): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@viceice commented on GitHub (Jul 21, 2021):

Any feedback?

@viceice commented on GitHub (Jul 21, 2021): Any feedback?
Author
Owner

@zeripath commented on GitHub (Jul 22, 2021):

Set POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES = true and DEFAULT_MERGE_MESSAGE_SIZE=0

@zeripath commented on GitHub (Jul 22, 2021): Set POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES = true and DEFAULT_MERGE_MESSAGE_SIZE=0
Author
Owner

@viceice commented on GitHub (Jul 23, 2021):

Set POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES = true and DEFAULT_MERGE_MESSAGE_SIZE=0

OK. so that will only work for gitea v1.15? Any ETA? 🙃

Will gitea v1.14.x ignore setting POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES=true ?

@viceice commented on GitHub (Jul 23, 2021): > Set POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES = true and DEFAULT_MERGE_MESSAGE_SIZE=0 OK. so that will only work for gitea v1.15? Any ETA? 🙃 Will gitea v1.14.x ignore setting `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES=true` ?
Author
Owner

@viceice commented on GitHub (Jul 23, 2021):

Fixed by #16134 in gitea v1.15

@viceice commented on GitHub (Jul 23, 2021): Fixed by #16134 in gitea v1.15
Author
Owner

@viceice commented on GitHub (Jul 23, 2021):

@zeripath Can you add this to the v1.15 milestore?

@viceice commented on GitHub (Jul 23, 2021): @zeripath Can you add this to the v1.15 milestore?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7351