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

Make default merge messages configurable #17307

Closed
MarkusAmshove opened this issue Oct 14, 2021 · 1 comment
Closed

Make default merge messages configurable #17307

MarkusAmshove opened this issue Oct 14, 2021 · 1 comment
Labels
issue/duplicate The issue has already been reported.

Comments

@MarkusAmshove
Copy link
Contributor

Feature Description

Hello there 👋🏻

Currently the default commit messages for merges in pull requests are hard coded within Gitea:

gitea/models/pull.go

Lines 243 to 247 in 20eaca6

if pr.BaseRepoID == pr.HeadRepoID {
return fmt.Sprintf("Merge pull request '%s' (%s%d) from %s into %s", pr.Issue.Title, issueReference, pr.Issue.Index, pr.HeadBranch, pr.BaseBranch)
}
return fmt.Sprintf("Merge pull request '%s' (%s%d) from %s:%s into %s", pr.Issue.Title, issueReference, pr.Issue.Index, pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseBranch)

I think it would be great if the default message could be a template, so that we can change them to our needs.

In our specific case the title of a PR has to be in a fixed form, e.g. "Issue #12345: Support commit message templates".
The commits within our repositories also have to comply to that form, so the workflow for merging is always:

  1. Press merge button
  2. Cut out the first part of the message up to PR title
  3. Cut out everything after the PR title

With a template I could just change the template from Merge pull request '{{.Title}}'... to {{.Title}} :-)

Screenshots

No response

@qwerty287
Copy link
Contributor

Duplicate of #11089?

@noerw noerw closed this as completed Oct 17, 2021
@noerw noerw added the issue/duplicate The issue has already been reported. label Oct 17, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

No branches or pull requests

3 participants