1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-18 00:47:48 -04:00

small improvements

This commit is contained in:
Lunny Xiao 2024-10-01 22:37:37 -07:00
parent 378949131e
commit e30e9b347e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
3 changed files with 3 additions and 3 deletions

View File

@ -284,7 +284,7 @@ func handlePullRequestAutoMerge(pullID int64, sha string) {
}
// We don't check doer's permission here because their permissions have been checked
// before ids were stored to the auto_merge table
// before the pull request was scheduled to auto merge
perm := access_model.Permission{AccessMode: perm.AccessModeWrite}
if err := pull_service.CheckPullMergeable(ctx, doer, &perm, pr, pull_service.MergeCheckTypeGeneral, false); err != nil {

View File

@ -27,7 +27,7 @@ func (n *automergeNotifier) PullRequestReview(ctx context.Context, pr *issues_mo
// as a missing / blocking reviews could have blocked a pending automerge let's recheck
if review.Type == issues_model.ReviewTypeApprove {
if err := StartPRCheckAndAutoMergeBySHA(ctx, review.CommitID, pr.BaseRepo); err != nil {
log.Error("StartPullRequestAutoMergeCheckBySHA: %v", err)
log.Error("StartPRCheckAndAutoMergeBySHA: %v", err)
}
}
}

View File

@ -116,7 +116,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
if status.State.IsSuccess() {
if err := automerge.StartPRCheckAndAutoMergeBySHA(ctx, sha, repo); err != nil {
return fmt.Errorf("MergeScheduledPullRequest[repo_id: %d, user_id: %d, sha: %s]: %w", repo.ID, creator.ID, sha, err)
return fmt.Errorf("StartPRCheckAndAutoMergeBySHA[repo_id: %d, user_id: %d, sha: %s]: %w", repo.ID, creator.ID, sha, err)
}
}