PR UI doesn't reflect updated merge commit template in PR #14560

Open
opened 2025-11-02 11:16:16 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @kazarmy on GitHub (Jun 7, 2025).

Description

After updating the merge commit template in a PR (via changing .gitea/default_merge_message/MERGE_TEMPLATE.md in a repo), I expect that the PR web UI immediately reflects this change after I press the "Create merge commit" button in the screenshot below. Instead, I have to commit the PR first, and if I get it wrong, I have to do another PR.

Looking at the code, it appears that the relevant code is:
47d69b7749/services/pull/merge.go (L68-L73)
and that the fix involves retrieving the template from the head repo rather than the base repo. This doesn't appear to be a difficult fix (assuming that there are no design issues) but I currently do not know enough Gitea (and Go) to be certain.

Gitea Version

1.23.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image

Git Version

2.46.2.windows.1

Operating System

Windows 11

How are you running Gitea?

gitea-1.23.8-windows-4.0-amd64.exe as a Windows service

Database

SQLite

Originally created by @kazarmy on GitHub (Jun 7, 2025). ### Description After updating the merge commit template in a PR (via changing `.gitea/default_merge_message/MERGE_TEMPLATE.md` in a repo), I expect that the PR web UI immediately reflects this change after I press the "Create merge commit" button in the screenshot below. Instead, I have to commit the PR first, and if I get it wrong, I have to do another PR. Looking at the code, it appears that the relevant code is: https://github.com/go-gitea/gitea/blob/47d69b7749689a7a7570ac20bdfd30d336daf7c1/services/pull/merge.go#L68-L73 and that the fix involves retrieving the template from the head repo rather than the base repo. This doesn't appear to be a difficult fix (assuming that there are no design issues) but I currently do not know enough Gitea (and Go) to be certain. ### Gitea Version 1.23.8 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![Image](https://github.com/user-attachments/assets/b21c6cff-eea2-4431-b21f-07461cc25bd1) ### Git Version 2.46.2.windows.1 ### Operating System Windows 11 ### How are you running Gitea? `gitea-1.23.8-windows-4.0-amd64.exe` as a Windows service ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 11:16:16 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14560