github

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 10 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
}

func New

func New(options Options) *Client

func (*Client) GetIssue

func (c *Client) GetIssue(ctx context.Context, owner, repo string, number int, reporter Reporter) (map[string]any, error)

func (*Client) GetPull

func (c *Client) GetPull(ctx context.Context, owner, repo string, number int, reporter Reporter) (map[string]any, error)

func (*Client) GetRepo

func (c *Client) GetRepo(ctx context.Context, owner, repo string, reporter Reporter) (map[string]any, error)

func (*Client) ListCommitCheckRuns added in v0.2.0

func (c *Client) ListCommitCheckRuns(ctx context.Context, owner, repo, ref string, reporter Reporter) ([]map[string]any, error)

func (*Client) ListIssueComments

func (c *Client) ListIssueComments(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

func (*Client) ListPullCommits added in v0.2.0

func (c *Client) ListPullCommits(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

func (*Client) ListPullFiles

func (c *Client) ListPullFiles(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

func (*Client) ListPullReviewComments

func (c *Client) ListPullReviewComments(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

func (*Client) ListPullReviewThreads added in v0.3.3

func (c *Client) ListPullReviewThreads(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

ListPullReviewThreads fetches GitHub's review-thread graph for a pull request.

func (*Client) ListPullReviews

func (c *Client) ListPullReviews(ctx context.Context, owner, repo string, number int, reporter Reporter) ([]map[string]any, error)

func (*Client) ListRepositoryIssues

func (c *Client) ListRepositoryIssues(ctx context.Context, owner, repo string, options ListIssuesOptions, reporter Reporter) ([]map[string]any, error)

func (*Client) ListWorkflowRuns added in v0.2.0

func (c *Client) ListWorkflowRuns(ctx context.Context, owner, repo string, options ListWorkflowRunsOptions, reporter Reporter) ([]map[string]any, error)

type ListIssuesOptions

type ListIssuesOptions struct {
	State         string
	Since         string
	Limit         int
	ExpectedTotal int
}

type ListWorkflowRunsOptions added in v0.2.0

type ListWorkflowRunsOptions struct {
	Branch  string
	HeadSHA string
	Limit   int
}

type Options

type Options struct {
	Token      string
	BaseURL    string
	UserAgent  string
	HTTPClient *http.Client
	PageDelay  time.Duration
	RateLimit  RateLimitObserver
}

type RateLimitObserver added in v0.3.2

type RateLimitObserver func(RateLimitSnapshot)

type RateLimitSnapshot added in v0.3.2

type RateLimitSnapshot struct {
	Host      string
	Limit     int
	Remaining int
	ResetAt   time.Time
	Resource  string
}

type Reporter

type Reporter func(message string)

func (Reporter) Printf

func (r Reporter) Printf(format string, args ...any)

type RequestError

type RequestError struct {
	Method  string
	URL     string
	Status  int
	Body    string
	Headers http.Header
}

func (*RequestError) Error

func (e *RequestError) Error() string

Jump to

Keyboard shortcuts

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