diff options
author | Giteabot <teabot@gitea.io> | 2024-05-09 00:38:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-08 16:38:46 +0000 |
commit | 2f91a461f7f25f9b59c7c54406b4dbe2a44e2fc2 (patch) | |
tree | 85ac569b6b59cfaad36294cec977899bd98c943c /services/pull | |
parent | 084bec89ed7ae0816fc2d8db6784ad22523d1fc4 (diff) | |
download | gitea-2f91a461f7f25f9b59c7c54406b4dbe2a44e2fc2.tar.gz gitea-2f91a461f7f25f9b59c7c54406b4dbe2a44e2fc2.zip |
Fix misspelling of mergable (#30896) (#30905)
Backport #30896 by @yp05327
https://github.com/go-gitea/gitea/pull/25812#issuecomment-2099833692
Follow #30573
Co-authored-by: yp05327 <576951401@qq.com>
Diffstat (limited to 'services/pull')
-rw-r--r-- | services/pull/check.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/pull/check.go b/services/pull/check.go index 9495e8ad5f..7d93ff7a8a 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -39,7 +39,7 @@ var ( ErrHasMerged = errors.New("has already been merged") ErrIsWorkInProgress = errors.New("work in progress PRs cannot be merged") ErrIsChecking = errors.New("cannot merge while conflict checking is in progress") - ErrNotMergableState = errors.New("not in mergeable state") + ErrNotMergeableState = errors.New("not in mergeable state") ErrDependenciesLeft = errors.New("is blocked by an open dependency") ) @@ -66,8 +66,8 @@ const ( MergeCheckTypeAuto // Auto Merge (Scheduled Merge) After Checks Succeed ) -// CheckPullMergable check if the pull mergeable based on all conditions (branch protection, merge options, ...) -func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, pr *issues_model.PullRequest, mergeCheckType MergeCheckType, adminSkipProtectionCheck bool) error { +// CheckPullMergeable check if the pull mergeable based on all conditions (branch protection, merge options, ...) +func CheckPullMergeable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, pr *issues_model.PullRequest, mergeCheckType MergeCheckType, adminSkipProtectionCheck bool) error { return db.WithTx(stdCtx, func(ctx context.Context) error { if pr.HasMerged { return ErrHasMerged @@ -97,7 +97,7 @@ func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *acce } if !pr.CanAutoMerge() && !pr.IsEmpty() { - return ErrNotMergableState + return ErrNotMergeableState } if pr.IsChecking() { |