Make default merge messages configurable #7970

Closed
opened 2025-11-02 07:43:09 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @markusamshove on GitHub (Oct 14, 2021).

Feature Description

Hello there 👋🏻

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

20eaca6d05/models/pull.go (L243-L247)

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

Originally created by @markusamshove on GitHub (Oct 14, 2021). ### Feature Description Hello there 👋🏻 Currently the default commit messages for merges in pull requests are hard coded within Gitea: https://github.com/go-gitea/gitea/blob/20eaca6d05ddeb56f5a76638e84211117c3f0131/models/pull.go#L243-L247 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_
GiteaMirror added the issue/duplicate label 2025-11-02 07:43:09 -06:00
Author
Owner

@qwerty287 commented on GitHub (Oct 14, 2021):

Duplicate of https://github.com/go-gitea/gitea/issues/11089?

@qwerty287 commented on GitHub (Oct 14, 2021): Duplicate of https://github.com/go-gitea/gitea/issues/11089?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7970