diff options
author | 6543 <6543@obermui.de> | 2022-05-08 15:46:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 15:46:34 +0200 |
commit | 6a969681cd862bf153fa7921485278be1e8a092a (patch) | |
tree | f9a23ee85652c0ee179f215b23d928058176ae6c /routers/api/v1/repo/pull.go | |
parent | 4344a6410788f30848e5153f6356dcdd0774bebc (diff) | |
download | gitea-6a969681cd862bf153fa7921485278be1e8a092a.tar.gz gitea-6a969681cd862bf153fa7921485278be1e8a092a.zip |
Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649)
* delete pullautomerges on repo/user deletion
* delete reviewstates on repo/user deletion
* optimize automerhe code
* add index to reviewstate
Diffstat (limited to 'routers/api/v1/repo/pull.go')
-rw-r--r-- | routers/api/v1/repo/pull.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index ecf96ea0c2..f95bc6b16b 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -1208,7 +1208,7 @@ func CancelScheduledAutoMerge(ctx *context.APIContext) { } } - if err := pull_model.RemoveScheduledAutoMerge(ctx, ctx.Doer, pull.ID, true); err != nil { + if err := automerge.RemoveScheduledAutoMerge(ctx, ctx.Doer, pull); err != nil { ctx.InternalServerError(err) } else { ctx.Status(http.StatusNoContent) |