github

package
v1.3.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 NewClient

func NewClient(token, owner, repo string) *Client

NewClient creates a new GitHub client with token authentication

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

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

func (c *Client) GetLatestWorkflow(ctx context.Context, branch string) (*remote.Workflow, error)

GetLatestWorkflow returns the most recent workflow run for a branch

func (*Client) GetPullRequest

func (c *Client) GetPullRequest(ctx context.Context, prNumber int) (*github.PullRequest, error)

GetPullRequest returns a single pull request by number

func (*Client) GetPullRequestByBranch

func (c *Client) GetPullRequestByBranch(ctx context.Context, branch string) (int, string, error)

GetPullRequestByBranch finds a PR for the given head branch

func (*Client) GetPullRequestChecks

func (c *Client) GetPullRequestChecks(ctx context.Context, prNumber int) (*remote.PRChecks, error)

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

func (c *Client) ListPullRequests(ctx context.Context, state string) ([]*github.PullRequest, error)

ListPullRequests lists pull requests with the given state (open, closed, all)

func (*Client) MarkPullRequestReady

func (c *Client) MarkPullRequestReady(ctx context.Context, prNumber int) error

MarkPullRequestReady marks a draft PR as ready for review

func (*Client) MergePullRequest

func (c *Client) MergePullRequest(ctx context.Context, prNumber int, method string) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL