The ‘Manually merged’ button does not display the SHA input field #9477

Closed
opened 2025-11-02 08:40:02 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @kytta on GitHub (Aug 28, 2022).

Description

I have noticed this issue on Codeberg, but I have been able to replicate it on Gitea.

Steps to reproduce

  1. Assuming there already is a branch with changes, create a pull request
  2. Follow the command-line instructions and merge the pull request locally, then push changes
  3. Refresh the PR page. It now says: This branch is already included in the target branch. There is nothing to merge.
  4. Click the ‘Manually merged’ button.

Expected behaviour

Just like in pre-1.17 versions, an input field appears, where one can enter the SHA of the merge commit

Actual behaviour

Nothing happens

Additional information

If one opens the DevTools, one can see that the input field is actually there, but hidden. I guess some script doesn’t toggle the display: none property off. If one does it manually, the field appears and functions well.

The issue doesn’t happen, if the auto-detection for manual merges is on and such merge gets automatically detected correctly.

Gitea Version

1.17.1+48-g91c2bab

Can you reproduce the bug on the Gitea demo site?

Yes, I have tested it.

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian 10

How are you running Gitea?

AFAIK, Codeberg runs Gitea as a systemd service on a Debian 10 server.

Database

MySQL

Originally created by @kytta on GitHub (Aug 28, 2022). ### Description I have noticed this issue on [Codeberg](https://codeberg.org/), but I have been able to replicate it on Gitea. #### Steps to reproduce 1. Assuming there already is a branch with changes, create a pull request 2. Follow the command-line instructions and merge the pull request locally, then push changes 3. Refresh the PR page. It now says: _This branch is already included in the target branch. There is nothing to merge._ 4. Click the ‘Manually merged’ button. #### Expected behaviour Just like in pre-1.17 versions, an input field appears, where one can enter the SHA of the merge commit #### Actual behaviour Nothing happens ### Additional information If one opens the DevTools, one can see that the input field is actually there, but hidden. I guess some script doesn’t toggle the `display: none` property off. If one does it manually, the field appears and functions well. The issue doesn’t happen, if the auto-detection for manual merges is on and such merge gets automatically detected correctly. ### Gitea Version 1.17.1+48-g91c2bab ### Can you reproduce the bug on the Gitea demo site? Yes, [I have tested it](https://try.gitea.io/kytta/manually-merged-test/pulls/1). ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Debian 10 ### How are you running Gitea? AFAIK, Codeberg runs Gitea as a `systemd` service on a Debian 10 server. ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:40:02 -06:00
Author
Owner

@kytta commented on GitHub (Aug 28, 2022):

I think I have found the issue; it happened after rewriting the merge dialog in Vue (commit 368baf9e77)

In this commit, there was a new Vue component introduced, <PullRequestMergeForm>. In case one can merge the PR, it is shown: bb0ff77e46/templates/repo/issue/view_content/pull.tmpl (L413)

However, if the manual merge took place, the condition IsAncestor fires: bb0ff77e46/templates/repo/issue/view_content/pull.tmpl (L198-L202)
In this case, line 413 will not be rendered.

In the end, there is a separate condition for manual merging. It displays a form, which is hidden by default, but since the old script for un-hiding those files is gone, there is no way to show it: bb0ff77e46/templates/repo/issue/view_content/pull.tmpl (L492-L514)

In particular, this is where the lines, that would show this form, were deleted.

@kytta commented on GitHub (Aug 28, 2022): I think I have found the issue; it happened after rewriting the merge dialog in Vue (commit https://github.com/go-gitea/gitea/commit/368baf9e77606e5de8bbcda8b0348f1a6fba6d73) In this commit, there was a new Vue component introduced, [`<PullRequestMergeForm>`](https://github.com/go-gitea/gitea/blob/main/web_src/js/components/PullRequestMergeForm.vue). In case one can merge the PR, it is shown: https://github.com/go-gitea/gitea/blob/bb0ff77e461ae080b1722701aea74010ff71e0ae/templates/repo/issue/view_content/pull.tmpl#L413 However, if the manual merge took place, the condition `IsAncestor` fires: https://github.com/go-gitea/gitea/blob/bb0ff77e461ae080b1722701aea74010ff71e0ae/templates/repo/issue/view_content/pull.tmpl#L198-L202 In this case, [line 413](https://github.com/go-gitea/gitea/blob/bb0ff77e461ae080b1722701aea74010ff71e0ae/templates/repo/issue/view_content/pull.tmpl#L413) will not be rendered. In the end, there is a separate condition for manual merging. It displays a form, which is hidden by default, but since the old script for un-hiding those files is gone, there is no way to show it: https://github.com/go-gitea/gitea/blob/bb0ff77e461ae080b1722701aea74010ff71e0ae/templates/repo/issue/view_content/pull.tmpl#L492-L514 In particular, [this is where the lines, that would show this form, were deleted](https://github.com/go-gitea/gitea/commit/368baf9e77606e5de8bbcda8b0348f1a6fba6d73#diff-d39a63ccfd5f0fe703f74ce48a3624ba59a856317b0d236d7eae87dfcf6c1c20L240-L246).
Author
Owner

@wxiaoguang commented on GitHub (Feb 20, 2023):

I did the refactoring, but I missed this issue. So, I will fix it.

@wxiaoguang commented on GitHub (Feb 20, 2023): I did the refactoring, but I missed this issue. So, I will fix it.
Author
Owner

@wxiaoguang commented on GitHub (Feb 20, 2023):

Sorry for the inconvenience, the fix: Fix the Manually Merged form #23015

@wxiaoguang commented on GitHub (Feb 20, 2023): Sorry for the inconvenience, the fix: Fix the Manually Merged form #23015
Author
Owner

@TFMahabub commented on GitHub (Mar 11, 2023):

I get Compare & pull request button, when I click the button I see this page. there are don't have any button to merge the commit

`Search or jump to…
Pull requests
Issues
Codespaces
Marketplace
Explore

@TFMahabub
TFMahabub
/
Spicy-Heat
Public
Cannot fork because you own this repository and are not a member of any organizations.
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

...

There isn’t anything to compare.
master and aboutpage are entirely different commit histories.

Showing with 38 additions and 0 deletions.
36
Components/pages/About/SophisticatedInterpretation/SophisticatedInterpretation.tsx
@@ -0,0 +1,36 @@
import SectionTitle from "@/Components/reusedComponents/SectionTitle";
import sideImage from "@/public/assats/aboutUs(resturent).jpg";
import Image from "next/image";

const SophisticatedInterpretation = () => {
return (









A distinctive, well-preserved and comfortable space, high-quality
products, authentic cuisine, food and drinks are done flawlessly.



We continue to be one of the top Japanese restaurants in America,
attracting countless food lovers from all over the world. Our
one-of-a-kind menu includes authentic tapas-style Japanese dishes
and homemade desserts.





);
};

export default SophisticatedInterpretation;
2
pages/about.tsx
@@ -1,4 +1,5 @@
import AboutHeader from "@/Components/pages/About/AboutHeader/AboutHeader"; import AboutHeader from "@/Components/pages/About/AboutHeader/AboutHeader";
import SophisticatedInterpretation from "@/Components/pages/About/SophisticatedInterpretation/SophisticatedInterpretation";
import BackgroundImageOverlay from "@/Components/reusedComponents/BackgroundImageOverlay"; import BackgroundImageOverlay from "@/Components/reusedComponents/BackgroundImageOverlay";

const about = () => { const about = () => {
@@ -10,6 +11,7 @@ const about = () => {
> >



</> </>
); );
}; };
BIN +142 KB
public/assats/aboutUs(resturent).jpg

Footer
© 2023 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Docs
Contact GitHub
Pricing
API
Training
Blog
About`

@TFMahabub commented on GitHub (Mar 11, 2023): I get Compare & pull request button, when I click the button I see this page. there are don't have any button to merge the commit `Search or jump to… [Pull requests](https://github.com/pulls) [Issues](https://github.com/issues) [Codespaces](https://github.com/codespaces) [Marketplace](https://github.com/marketplace) [Explore](https://github.com/explore) @[TFMahabub](https://github.com/TFMahabub) TFMahabub / [Spicy-Heat](https://github.com/TFMahabub/Spicy-Heat) Public Cannot fork because you own this repository and are not a member of any organizations. Code Issues Pull requests Actions Projects Wiki Security Insights Settings Comparing changes Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also . ... There isn’t anything to compare. master and aboutpage are entirely different commit histories. Showing with 38 additions and 0 deletions. 36 Components/pages/About/SophisticatedInterpretation/SophisticatedInterpretation.tsx @@ -0,0 +1,36 @@ import SectionTitle from "@/Components/reusedComponents/SectionTitle"; import sideImage from "@/public/assats/aboutUs(resturent).jpg"; import Image from "next/image"; const SophisticatedInterpretation = () => { return ( <div className="section_gap container flex flex-col lg:flex-row gap-16 justify-between"> <div className="flex-1"> <Image src={sideImage} className="" alt="" /> </div> <div className="flex-1 lg:flex lg:flex-col lg:justify-between"> <div> <SectionTitle topText="FOUNDED IN 1998" bottomText="A Sophisticated Interpretation Of Traditional Japanese Cuisine" leftLine={false} rightLine={true} topTextCenter={false} /> <p className="pText"> A distinctive, well-preserved and comfortable space, high-quality products, authentic cuisine, food and drinks are done flawlessly. </p> <p className="pText"> We continue to be one of the top Japanese restaurants in America, attracting countless food lovers from all over the world. Our one-of-a-kind menu includes authentic tapas-style Japanese dishes and homemade desserts. </p> </div> </div> </div> ); }; export default SophisticatedInterpretation; 2 pages/about.tsx @@ -1,4 +1,5 @@ import AboutHeader from "@/Components/pages/About/AboutHeader/AboutHeader"; import AboutHeader from "@/Components/pages/About/AboutHeader/AboutHeader"; import SophisticatedInterpretation from "@/Components/pages/About/SophisticatedInterpretation/SophisticatedInterpretation"; import BackgroundImageOverlay from "@/Components/reusedComponents/BackgroundImageOverlay"; import BackgroundImageOverlay from "@/Components/reusedComponents/BackgroundImageOverlay"; const about = () => { const about = () => { @@ -10,6 +11,7 @@ const about = () => { > > <AboutHeader /> <AboutHeader /> </BackgroundImageOverlay> </BackgroundImageOverlay> <SophisticatedInterpretation /> </> </> ); ); }; }; BIN +142 KB public/assats/aboutUs(resturent).jpg Footer © 2023 GitHub, Inc. Footer navigation Terms Privacy [Security](https://github.com/TFMahabub/Spicy-Heat/security) [Status](https://www.githubstatus.com/) [Docs](https://docs.github.com/) [Contact GitHub](https://support.github.com/?tags=dotcom-footer) [Pricing](https://github.com/pricing) [API](https://docs.github.com/) [Training](https://services.github.com/) [Blog](https://github.blog/) [About](https://github.com/about)`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9477