diff options
author | yp05327 <576951401@qq.com> | 2024-05-09 01:11:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-08 16:11:43 +0000 |
commit | f7d2f695a4c57b245830a526e77fa62e99e00254 (patch) | |
tree | ae475156194e0db918bb8137f90a620b345edc84 /routers/api | |
parent | 3fdb2d4ad8a3bf4c5fbcc417a274be2fc695882b (diff) | |
download | gitea-f7d2f695a4c57b245830a526e77fa62e99e00254.tar.gz gitea-f7d2f695a4c57b245830a526e77fa62e99e00254.zip |
Fix misspelling of mergable (#30896)
https://github.com/go-gitea/gitea/pull/25812#issuecomment-2099833692
Follow #30573
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/pull.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 8bd4ddf64b..38a32a73c7 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -881,7 +881,7 @@ func MergePullRequest(ctx *context.APIContext) { } // start with merging by checking - if err := pull_service.CheckPullMergable(ctx, ctx.Doer, &ctx.Repo.Permission, pr, mergeCheckType, form.ForceMerge); err != nil { + if err := pull_service.CheckPullMergeable(ctx, ctx.Doer, &ctx.Repo.Permission, pr, mergeCheckType, form.ForceMerge); err != nil { if errors.Is(err, pull_service.ErrIsClosed) { ctx.NotFound() } else if errors.Is(err, pull_service.ErrUserNotAllowedToMerge) { @@ -890,7 +890,7 @@ func MergePullRequest(ctx *context.APIContext) { ctx.Error(http.StatusMethodNotAllowed, "PR already merged", "") } else if errors.Is(err, pull_service.ErrIsWorkInProgress) { ctx.Error(http.StatusMethodNotAllowed, "PR is a work in progress", "Work in progress PRs cannot be merged") - } else if errors.Is(err, pull_service.ErrNotMergableState) { + } else if errors.Is(err, pull_service.ErrNotMergeableState) { ctx.Error(http.StatusMethodNotAllowed, "PR not in mergeable state", "Please try again later") } else if models.IsErrDisallowedToMerge(err) { ctx.Error(http.StatusMethodNotAllowed, "PR is not ready to be merged", err) |