mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 15:02:43 +00:00
Move all push update operations to a queue (#10133)
* Fix test * Add no queue for test only * improve code * Auto watch whatever branch operation * Fix lint * Rename noqueue to immediate * Remove old PushUpdate function * Fix tests Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
910947fbcd
commit
dd1a651b58
16 changed files with 552 additions and 585 deletions
|
@ -22,7 +22,6 @@ import (
|
|||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
"code.gitea.io/gitea/modules/repofiles"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
@ -1124,10 +1123,8 @@ func CleanUpPullRequest(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if err := repofiles.PushUpdate(
|
||||
pr.HeadRepo,
|
||||
pr.HeadBranch,
|
||||
repofiles.PushUpdateOptions{
|
||||
if err := repo_service.PushUpdate(
|
||||
&repo_service.PushUpdateOptions{
|
||||
RefFullName: git.BranchPrefix + pr.HeadBranch,
|
||||
OldCommitID: branchCommitID,
|
||||
NewCommitID: git.EmptySHA,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue