-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Automerge does not work #24445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The auto-merge isn't even working on a much simpler workflow by only requesting approval.
Now |
I did some research and it looks like currently automatic merging can only be triggered via API call (GT Actions state when executed successfully aren't counting here either; approval will not trigger this, too). gitea/routers/api/v1/repo/status.go Line 20 in 0533187
That API function will call the gitea/services/repository/files/commit.go Line 22 in 79995a8
... that will eventually end in adding a new merge message into the gitea/services/automerge/automerge.go Line 98 in 79995a8
In the end there are a few missing bits and pieces for actions and approvals that needs to be added. |
@nekrondev this is looks as a bug, because you can enable branch protection and block merge without any review. But any users can enable automerge and merge it after successful tests ... |
I did a quick test with
If I send the API request to commit a successful check the auto-merge is not executed which is fine (the PR still needs to be reviewed). However if I submit my PR review approval then without any additional calls to the API endpoint the change wouldn't be merged automatically. I think this is the same behavior for Gitea Actions that needs to call the proper automerge function internally after a successful check had been returned from the runner. @lunny I guess that Line 267 in 221b90d
is missing a call to |
I think the automerge logic should have some refactor. Maybe Gitea could learn some from GH. |
Same issue on GitTea 1.21 Running on: All through docker (via docker-compose) Any chance we can fix this? Any ideas of where to start looking? |
I really hope re-invigorating the auto-merge will also allow us to expose some endpoint to check PR mergeability (from more than just a git perspective, considering reviews/checks/correct merge base etc). |
…ered (#30780) Replace #25741 Close #24445 Close #30658 Close #20646 ~Depends on #30805~ Since #25741 has been rewritten totally, to make the contribution easier, I will continue the work in this PR. Thanks @6543 --------- Co-authored-by: 6543 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
…ered (go-gitea#30780) Replace go-gitea#25741 Close go-gitea#24445 Close go-gitea#30658 Close go-gitea#20646 ~Depends on go-gitea#30805~ Since go-gitea#25741 has been rewritten totally, to make the contribution easier, I will continue the work in this PR. Thanks @6543 --------- Co-authored-by: 6543 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
…ered (#30780) (#31039) Backport #30780 by @lunny Replace #25741 Close #24445 Close #30658 Close #20646 ~Depends on #30805~ Since #25741 has been rewritten totally, to make the contribution easier, I will continue the work in this PR. Thanks @6543 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: 6543 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
Description
I added next rules for merging PR
Gitea Version
1.19.2
Can you reproduce the bug on the Gitea demo site?
I don't know (I can't check it)
Log Gist
No response
Screenshots
Git Version
git version 2.25.1
Operating System
ubuntu 20.04 (Linux beloved-pipefish 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux)
How are you running Gitea?
I run Gitea from prepared binary files
Database
SQLite
The text was updated successfully, but these errors were encountered: