2023-03-09 13:28:33 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2023-03-09 14:46:32 +00:00
|
|
|
type PullRequestReader interface {
|
|
|
|
GetPullRequest(owner, repo string, index int64) (*gitea.PullRequest, *gitea.Response, error)
|
|
|
|
}
|
|
|
|
|
2023-03-09 13:28:33 +00:00
|
|
|
type WhoAmIer interface {
|
|
|
|
GetMyUserInfo() (*gitea.User, *gitea.Response, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
//go:generate mockery --name Client --filename gitea_client.mock.go
|
|
|
|
type Client interface {
|
|
|
|
PullReviewManager
|
2023-03-09 14:46:32 +00:00
|
|
|
PullRequestReader
|
2023-03-09 13:28:33 +00:00
|
|
|
WhoAmIer
|
|
|
|
}
|