Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePullRequest(ctx context.Context, title, body, head, base string, draft bool) (int, string, error)
- func (c *Client) GetLatestWorkflow(ctx context.Context, branch string) (*remote.Workflow, error)
- func (c *Client) GetPullRequest(ctx context.Context, prNumber int) (*github.PullRequest, error)
- func (c *Client) GetPullRequestByBranch(ctx context.Context, branch string) (int, string, error)
- func (c *Client) GetPullRequestChecks(ctx context.Context, prNumber int) (*remote.PRChecks, error)
- func (c *Client) GetPullRequestReviews(ctx context.Context, prNumber int) ([]*github.PullRequestReview, error)
- func (c *Client) ListPullRequests(ctx context.Context, state string) ([]*github.PullRequest, error)
- func (c *Client) MarkPullRequestReady(ctx context.Context, prNumber int) error
- func (c *Client) MergePullRequest(ctx context.Context, prNumber int, method string) error
- func (c *Client) WatchPullRequestChecks(ctx context.Context, prNumber int) (<-chan remote.PRChecksUpdate, error)
- func (c *Client) WatchWorkflow(ctx context.Context, workflowID string) (<-chan remote.WorkflowUpdate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements remote.Provider for GitHub Actions
func NewClientFromEnv ¶
NewClientFromEnv creates a GitHub client using environment variables and git remote
func (*Client) CreatePullRequest ¶
func (c *Client) CreatePullRequest(ctx context.Context, title, body, head, base string, draft bool) (int, string, error)
CreatePullRequest creates a new pull request
func (*Client) GetLatestWorkflow ¶
GetLatestWorkflow returns the most recent workflow run for a branch
func (*Client) GetPullRequest ¶
GetPullRequest returns a single pull request by number
func (*Client) GetPullRequestByBranch ¶
GetPullRequestByBranch finds a PR for the given head branch
func (*Client) GetPullRequestChecks ¶
GetPullRequestChecks returns the status of all checks/workflows for a PR
func (*Client) GetPullRequestReviews ¶
func (c *Client) GetPullRequestReviews(ctx context.Context, prNumber int) ([]*github.PullRequestReview, error)
GetPullRequestReviews returns reviews for a pull request
func (*Client) ListPullRequests ¶
ListPullRequests lists pull requests with the given state (open, closed, all)
func (*Client) MarkPullRequestReady ¶
MarkPullRequestReady marks a draft PR as ready for review
func (*Client) MergePullRequest ¶
MergePullRequest merges a pull request
func (*Client) WatchPullRequestChecks ¶
func (c *Client) WatchPullRequestChecks(ctx context.Context, prNumber int) (<-chan remote.PRChecksUpdate, error)
WatchPullRequestChecks streams updates for PR checks until all complete
func (*Client) WatchWorkflow ¶
func (c *Client) WatchWorkflow(ctx context.Context, workflowID string) (<-chan remote.WorkflowUpdate, error)
WatchWorkflow streams updates for a running workflow