-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
I can't get a Create merge commit
button on the PR page. I can't see any of the options shown in PR #19648. No matter which merge style or signing verification setting I chose, or whether I put in a key or not.
No console errors on the PR page.
It works on the demo site, but that uses v1.18.
Linux binary 1.17.2 running through an Nginx proxy available under https//domain/git.
Removing all templates doesn't fix the problem.
An incognito window doesn't help.
Debug Info
On the demo server, this div is populated: <div id="pull-request-merge-form"></div>
. On mine, it is not.
Above that div is some javascript that does run. I get no javascript console errors except for blocking gravatar. If I add console.log(JSON.stringify(mergeForm, null, 4));
to pull.tmpl, I get the dictionary below. I experimented with adjusting the boolean values such as allowing manual merge, not hiding messages, but that changed nothing.
{
"baseLink": "/git/repo/test-repo/pulls/2",
"textCancel": "Cancel",
"textDeleteBranch": "Delete Branch 'test-create-branch'",
"textAutoMergeButtonWhenSucceed": "(When checks succeed)",
"textAutoMergeWhenSucceed": "Auto merge when all checks succeed",
"textAutoMergeCancelSchedule": "Cancel auto merge",
"canMergeNow": true,
"allOverridableChecksOk": true,
"emptyCommit": false,
"pullHeadCommitID": "2d21983c92a1afa21e2a246533848f93515b4c64",
"isPullBranchDeletable": true,
"defaultMergeStyle": "merge",
"defaultDeleteBranchAfterMerge": false,
"mergeMessageFieldPlaceHolder": "Add an optional extended description…",
"hasPendingPullRequestMerge": false,
"hasPendingPullRequestMergeTip": "",
"mergeStyles": [
{
"name": "merge",
"allowed": true,
"textDoMerge": "Create merge commit",
"mergeTitleFieldText": "Merge pull request 'Upload test files' (#2) from test-create-branch into dev",
"mergeMessageFieldText": "Reviewed-on: https://domain/git/repo/test-repo/pulls/2\n",
"hideAutoMerge": true
},
{
"name": "rebase",
"allowed": true,
"textDoMerge": "Rebase then fast-forward",
"hideMergeMessageTexts": true,
"hideAutoMerge": true
},
{
"name": "rebase-merge",
"allowed": true,
"textDoMerge": "Rebase then create merge commit",
"mergeTitleFieldText": "Merge pull request 'Upload test files' (#2) from test-create-branch into dev",
"mergeMessageFieldText": "Reviewed-on: https://domain/git/repo/test-repo/pulls/2\n",
"hideAutoMerge": true
},
{
"name": "squash",
"allowed": true,
"textDoMerge": "Create squash commit",
"mergeTitleFieldText": "Upload test files (#2)",
"mergeMessageFieldText": "test PR\n\nCo-authored-by: user...\nReviewed-on: https://domain/git/repo/test-repo/pulls/2\n",
"hideAutoMerge": true
},
{
"name": "manually-merged",
"allowed": false,
"textDoMerge": "Manually merged",
"hideMergeMessageTexts": true,
"hideAutoMerge": true
}
]
}
Screenshots
This makes it look like I cannot merge anything unless I have a signed key. But that goes down a rabbit hole of confusing documentation and github issues where there is intentionally no official recommendation on how to set up and sign GPG keys. But the problem isn't the keys.
Gitea Version
1.17.2 Linux binary
Can you reproduce the bug on the Gitea demo site?
No
Operating System
Win11/64
Browser Version
Edge 105.0.1343.53
Database
Mysql
Activity
TokisanGames commentedon Oct 3, 2022
It appears I'm not the only one who has had this issue:
https://discord.com/channels/322538954119184384/561007778139734027/1026557311453507635
wxiaoguang commentedon Oct 6, 2022
Do you have the problem on try.gitea.io ?
TokisanGames commentedon Oct 6, 2022
No, as mentioned above and shown in the dark themed screenshot the demo site shows the buttons, but that site is using v1.18.
I have no console errors, no buttons, and nothing populating the div that should contain it.
wxiaoguang commentedon Oct 6, 2022
A lot of users are using Gitea 1.17.x, no other has such problem, it doesn't seem to be a Gitea's problem.
Since I know nothing about your environment, I couldn't provide more helps besides:
wxiaoguang commentedon Oct 7, 2022
Since it doesn't seem to be a Gitea bug, I will close this issue.
Feel free to re-open if you can reproduce it with a fresh setup and confirm it's a bug, or if you would propose some solutions for the edge cases or update the documents to help to future users to get rid of similar problems.
TokisanGames commentedon Oct 7, 2022
Indeed, I found the problem was due to using public files from an older release. I'm serving via proxy and had upgraded the binary without updating the static files. Now I've learned my lesson. Thanks for your help.
Note that the proxy page has information that is outdated and/or doesn't work for me:
https://docs.gitea.io/en-us/reverse-proxies/#nginx-and-serve-static-resources-directly
Download a snapshot of the Gitea source repository... Run make frontend...You will need to have Node with npm
The public folder is fortunately already included in the source download, so there's no reason to run
make frontend
, which says 'nothing to do' anyway. I can just download and move the public folder. Thanks for including a pre-built version.Here is what I had to do to get static files and proxy to work for accessing on https://mydomain.com/git
wxiaoguang commentedon Oct 7, 2022
You do not need to do that.
The document is clear:
Note: Trailing slash