Documentation
¶
Index ¶
- func RepoRoot() (string, error)
- type Client
- func (c *Client) CurrentUser(ctx context.Context) (string, error)
- func (c *Client) GetPullRequest(ctx context.Context, owner, repo string, number uint32) (*PullRequest, error)
- func (c *Client) RequestReview(ctx context.Context, owner, repo string, number uint32, reviewer ...string) error
- func (c *Client) SubmitReview(ctx context.Context, req SubmitReviewRequest) error
- type File
- type PullRequest
- type SubmitEvent
- type SubmitReviewRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetPullRequest ¶
func (*Client) RequestReview ¶
func (c *Client) RequestReview(ctx context.Context, owner, repo string, number uint32, reviewer ...string) error
RequestReview requests a review for the specified pull request. If no reviewer is specified, the current user is used.
func (*Client) SubmitReview ¶
func (c *Client) SubmitReview(ctx context.Context, req SubmitReviewRequest) error
type PullRequest ¶
type SubmitEvent ¶
type SubmitEvent string
const ( SubmitEventApprove SubmitEvent = "APPROVE" SubmitEventRequestChanges SubmitEvent = "REQUEST_CHANGES" SubmitEventComment SubmitEvent = "COMMENT" )
func (SubmitEvent) IsValid ¶
func (e SubmitEvent) IsValid() bool
type SubmitReviewRequest ¶
type SubmitReviewRequest struct {
Owner string // required
Repo string // required
Number int // required
Body string // +optional
Event SubmitEvent // required
}
Click to show internal directories.
Click to hide internal directories.