Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePullRequest(ctx context.Context, title, body, head, base string, draft bool) (int, string, error)
- func (c *Client) DeleteAllArtifacts(ctx context.Context) (deleted int, freedBytes int64, err error)
- func (c *Client) DeleteArtifact(ctx context.Context, artifactID int64) error
- func (c *Client) DeleteArtifactsBefore(ctx context.Context, before time.Time) (deleted int, freedBytes int64, err error)
- func (c *Client) DeleteExpiredArtifacts(ctx context.Context) (deleted int, freedBytes int64, err 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) GetPullRequestDetails(ctx context.Context, prNumber int) (*remote.PullRequestDetails, error)
- func (c *Client) GetPullRequestReviews(ctx context.Context, prNumber int) ([]*github.PullRequestReview, error)
- func (c *Client) ListArtifacts(ctx context.Context) (*remote.ArtifactStats, 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) WaitForChecksToStart(ctx context.Context, prNumber int, timeout time.Duration) (string, *remote.PRChecks, 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 NewClientWithBaseURL ¶ added in v1.2.1
NewClientWithBaseURL creates a new GitHub client for GitHub Enterprise with custom base URL
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) DeleteAllArtifacts ¶ added in v1.2.1
DeleteAllArtifacts deletes all artifacts in the repository
func (*Client) DeleteArtifact ¶ added in v1.2.1
DeleteArtifact deletes a single artifact by ID
func (*Client) DeleteArtifactsBefore ¶ added in v1.2.1
func (c *Client) DeleteArtifactsBefore(ctx context.Context, before time.Time) (deleted int, freedBytes int64, err error)
DeleteArtifactsBefore deletes all artifacts created before the given time
func (*Client) DeleteExpiredArtifacts ¶ added in v1.2.1
func (c *Client) DeleteExpiredArtifacts(ctx context.Context) (deleted int, freedBytes int64, err error)
DeleteExpiredArtifacts deletes all expired artifacts
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) GetPullRequestDetails ¶ added in v1.3.0
func (c *Client) GetPullRequestDetails(ctx context.Context, prNumber int) (*remote.PullRequestDetails, error)
GetPullRequestDetails returns comprehensive PR details for TUI display
func (*Client) GetPullRequestReviews ¶
func (c *Client) GetPullRequestReviews(ctx context.Context, prNumber int) ([]*github.PullRequestReview, error)
GetPullRequestReviews returns reviews for a pull request
func (*Client) ListArtifacts ¶ added in v1.2.1
ListArtifacts returns all artifacts for the repository with storage statistics
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) WaitForChecksToStart ¶ added in v1.2.1
func (c *Client) WaitForChecksToStart(ctx context.Context, prNumber int, timeout time.Duration) (string, *remote.PRChecks, error)
WaitForChecksToStart waits for CI checks to start for a PR This solves the race condition where CI hasn't started yet when we query
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