Documentation
¶
Overview ¶
Package github provides GitHub API client functionality for goreviewer.
Index ¶
- func GetEnvToken() string
- func GetPRFromEnv() (owner, repo string, prNumber int, err error)
- type Client
- func (c *Client) AddLabel(ctx context.Context, label string) error
- func (c *Client) FetchContext(ctx context.Context) (Context, error)
- func (c *Client) PostReview(ctx context.Context, body string) error
- func (c *Client) RemoveLabel(ctx context.Context, label string) error
- func (c *Client) ReplyToReviewComment(ctx context.Context, commentID int64, body string) error
- func (c *Client) SetPR(owner, repo string, prNumber int)
- func (c *Client) SetToken(token string)
- type Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPRFromEnv ¶
GetPRFromEnv returns PR details from environment variables.
Types ¶
type Client ¶
type Client struct {
Token string
IncludePrev bool
IncludeHuman bool
IncludeChecks bool
IncludeLabels bool
IncludeDesc bool
IncludeCommits bool
// contains filtered or unexported fields
}
Client wraps GitHub API client and configuration.
func NewClient ¶
func NewClient() *Client
NewClient creates a new GitHub client with default settings.
func (*Client) FetchContext ¶
FetchContext fetches GitHub context for a PR.
func (*Client) PostReview ¶
PostReview posts a new review comment to the PR.
func (*Client) RemoveLabel ¶
RemoveLabel removes a label from the PR.
func (*Client) ReplyToReviewComment ¶
ReplyToReviewComment replies to a specific review comment.
Click to show internal directories.
Click to hide internal directories.