1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-02 15:09:33 -05:00

Fix errors.Is

This commit is contained in:
Lunny Xiao 2024-10-01 22:20:29 -07:00
parent 3bce19d3a2
commit 378949131e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -288,7 +288,7 @@ func handlePullRequestAutoMerge(pullID int64, sha string) {
perm := access_model.Permission{AccessMode: perm.AccessModeWrite}
if err := pull_service.CheckPullMergeable(ctx, doer, &perm, pr, pull_service.MergeCheckTypeGeneral, false); err != nil {
if errors.Is(pull_service.ErrUserNotAllowedToMerge, err) {
if errors.Is(err, pull_service.ErrUserNotAllowedToMerge) {
log.Info("%-v was scheduled to automerge by an unauthorized user", pr)
return
}