nitter/nitters/gitea/api.go
Peter Kurfer 0409dd2fba
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
fix(gitea): don't approve if token is owned by PR creator
2023-03-09 15:54:23 +01:00

24 lines
785 B
Go

package gitea
import "code.gitea.io/sdk/gitea"
type PullReviewManager interface {
CreatePullReview(owner, repo string, index int64, opt gitea.CreatePullReviewOptions) (*gitea.PullReview, *gitea.Response, error)
ListPullReviews(owner, repo string, index int64, opt gitea.ListPullReviewsOptions) ([]*gitea.PullReview, *gitea.Response, error)
DeletePullReview(owner, repo string, index, id int64) (*gitea.Response, error)
}
type PullRequestReader interface {
GetPullRequest(owner, repo string, index int64) (*gitea.PullRequest, *gitea.Response, error)
}
type WhoAmIer interface {
GetMyUserInfo() (*gitea.User, *gitea.Response, error)
}
//go:generate mockery --name Client --filename gitea_client.mock.go
type Client interface {
PullReviewManager
PullRequestReader
WhoAmIer
}