[Note] Refactor Pull MergeBox logic #5236

Open
opened 2025-11-02 06:18:44 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @6543 on GitHub (Apr 15, 2020).

currently a lot of the logic went into templates/repo/issue/view_content/pull.tmpl witch is general a bad idear.

move status check logick back into a go function ...
(red vs yelow vs green ... icon)
(if if can merged or force-merged or blocked)

come up with: #11074

Originally created by @6543 on GitHub (Apr 15, 2020). currently a lot of the logic went into `templates/repo/issue/view_content/pull.tmpl` witch is general a bad idear. move status check logick back into a go function ... (red vs yelow vs green ... icon) (if if can merged or force-merged or blocked) come up with: #11074
GiteaMirror added the issue/confirmedtype/refactoring labels 2025-11-02 06:18:44 -06:00
Author
Owner

@stale[bot] commented on GitHub (Jun 14, 2020):

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 (Jun 14, 2020): 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

@6543 commented on GitHub (Jun 14, 2020):

ping

@6543 commented on GitHub (Jun 14, 2020): ping
Author
Owner

@silverwind commented on GitHub (May 1, 2023):

@6543 still valid?

@silverwind commented on GitHub (May 1, 2023): @6543 still valid?
Author
Owner

@MaxWipfli commented on GitHub (Jan 10, 2024):

Yes, this is still an issue. It is very related to a problem I am having, which is the following:

I want to use a default merge message (by using .gitea/default_merge_message/MERGE_TEMPLATE.md). However, this removes the Reviewed-on and Reviewed-by lines in the merge message, and as far as I can see, there is no way to add them back in using the message template.

The reason for this is that the logic constructing the default-default merge message (i.e., if MERGE_TEMPLATE.md does not exist) is embedded in templates/repo/issue/view_content/pull.tmpl. If DefaultMergeBody (which is the templated MERGE_TEMPLATE.md is not set, the Reviewed-on and Reviewed-by lines are directly injected into the HTML template.

What would be desired is a way to inject these lines into the custom merge template, most likely via some variables.

@MaxWipfli commented on GitHub (Jan 10, 2024): Yes, this is still an issue. It is very related to a problem I am having, which is the following: I want to use a default merge message (by using `.gitea/default_merge_message/MERGE_TEMPLATE.md`). However, this removes the `Reviewed-on` and `Reviewed-by` lines in the merge message, and as far as I can see, there is no way to add them back in using the message template. The reason for this is that the logic constructing the default-default merge message (i.e., if `MERGE_TEMPLATE.md` does not exist) is embedded in [`templates/repo/issue/view_content/pull.tmpl`](https://github.com/go-gitea/gitea/blob/a80debc208fbf0ecf6ca734e454cae08adafb570/templates/repo/issue/view_content/pull.tmpl#L211C28-L211C28). If `DefaultMergeBody` (which is the templated `MERGE_TEMPLATE.md` is not set, the `Reviewed-on` and `Reviewed-by` lines are directly injected into the HTML template. What would be desired is a way to inject these lines into the custom merge template, most likely via some variables.
Author
Owner

@lunny commented on GitHub (Jun 12, 2025):

I think the part to refactor pull mergebox logic could be closed since the related code changed a lot.

@lunny commented on GitHub (Jun 12, 2025): I think the part to refactor pull mergebox logic could be closed since the related code changed a lot.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5236