reviewers fix in tests
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"slices"
|
||||
@@ -115,6 +116,7 @@ func (rs *PRSet) IsReviewed(gitea common.GiteaReviewFetcher) bool {
|
||||
reviewers = configReviewers.Pkg
|
||||
}
|
||||
|
||||
log.Println(reviewers)
|
||||
r, err := FetchGiteaReviews(gitea, reviewers, pr.pr.Base.Repo.Owner.UserName, pr.pr.Base.Repo.Name, pr.pr.Index)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
@@ -102,7 +102,7 @@ func TestPR(t *testing.T) {
|
||||
{
|
||||
pr: &models.PullRequest{Body: "", Index: 42, Base: &models.PRBranchInfo{Repo: &models.Repository{Name: "barPrj", Owner: &models.User{UserName: "foo"}}}},
|
||||
reviews: []*models.PullReview{
|
||||
{Body: "LGTM", User: &models.User{UserName: "super1"}, State: common.ReviewStateApproved},
|
||||
{Body: "LGTM", User: &models.User{UserName: "m2"}, State: common.ReviewStateApproved},
|
||||
{Body: "LGTM", User: &models.User{UserName: "super2"}, State: common.ReviewStateApproved},
|
||||
{Body: "LGTM", User: &models.User{UserName: common.Bot_BuildReview}, State: common.ReviewStateApproved},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user