From a91cc98e7f8f706bb5a96dcb0a7d0e22b0a94cd0 Mon Sep 17 00:00:00 2001 From: william-allspice Date: Fri, 16 Aug 2024 15:41:25 -0500 Subject: [PATCH] clean up --- models/git/protected_branch_test.go | 3 --- models/issues/review.go | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/models/git/protected_branch_test.go b/models/git/protected_branch_test.go index ce80856f39..c339999e76 100644 --- a/models/git/protected_branch_test.go +++ b/models/git/protected_branch_test.go @@ -15,7 +15,6 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/log" "github.com/stretchr/testify/assert" ) @@ -90,12 +89,10 @@ func TestIsUserOfficialReviewer(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - log.Info(fmt.Sprintf("repo.IsPrivate %v", repo.IsPrivate)) protectedBranch := &git_model.ProtectedBranch{ RepoID: repo.ID, EnableApprovalsWhitelist: false, } - user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) access := &access_model.Access{ diff --git a/models/issues/review.go b/models/issues/review.go index 11ea820aac..ef5fc0b194 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -277,6 +277,7 @@ func IsOfficialReviewer(ctx context.Context, issue *Issue, reviewer *user_model. } return writeAccess, nil } + official, err := git_model.IsUserOfficialReviewer(ctx, rule, reviewer) if official || err != nil { return official, err