autogits/workflow-pr/review.go
2024-12-16 18:12:54 +01:00

32 lines
591 B
Go

package main
import (
"errors"
"src.opensuse.org/autogits/common"
"src.opensuse.org/autogits/common/gitea-generated/models"
)
type Review interface {
IsApproved() (bool, error)
}
type PRInfo struct {
pr *models.PullRequest
reviews []*models.PullReview
}
type ReviewSet struct {
maintainers MaintainershipData
prs []PRInfo
}
func FetchReviewSet(gitea common.GiteaPRReviewFetcher, org, repo string, num int64) (*ReviewSet, error) {
_,_, err := gitea.GetPullRequestAndReviews(org, repo, num)
if err != nil {
return nil, err
}
return nil, errors.New("Error")
}