Skip to content
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

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

Closed
1 of 6 tasks
viceice opened this issue May 18, 2021 · 7 comments
Closed
1 of 6 tasks

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

viceice opened this issue May 18, 2021 · 7 comments
Labels
Milestone

Comments

@viceice
Copy link
Contributor

viceice commented 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

@viceice
Copy link
Contributor Author

viceice commented May 18, 2021

I think it should repect DEFAULT_MERGE_MESSAGE_SIZE=0 here:

gitea/services/pull/pull.go

Lines 573 to 577 in 1da0d15

stringBuilder.WriteString(pr.Issue.Content)
if stringBuilder.Len() > 0 {
stringBuilder.WriteRune('\n')
stringBuilder.WriteRune('\n')
}

@noerw noerw added the type/bug label May 20, 2021
@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jul 21, 2021
@viceice
Copy link
Contributor Author

viceice commented Jul 21, 2021

Any feedback?

@stale stale bot removed the issue/stale label Jul 21, 2021
@zeripath
Copy link
Contributor

Set POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES = true and DEFAULT_MERGE_MESSAGE_SIZE=0

@viceice
Copy link
Contributor Author

viceice commented 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
Copy link
Contributor Author

viceice commented Jul 23, 2021

Fixed by #16134 in gitea v1.15

@viceice viceice closed this as completed Jul 23, 2021
@viceice
Copy link
Contributor Author

viceice commented Jul 23, 2021

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

@zeripath zeripath added this to the 1.15.0 milestone Jul 23, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants