Documentation
¶
Overview ¶
Package github wraps the `gh` CLI and GitHub REST API to fetch pull request diffs and file contents.
Index ¶
- func CollectTODOs(fetcher PRFetcher, repo, pr string, todoTypes []string) ([]types.TODO, error)
- type Client
- func (c *Client) FetchChangedFileContents(repo, pr, diffOutput string, todoTypes []string) (map[string][]byte, error)
- func (c *Client) FetchDiff(repo, pr string) (string, error)
- func (c *Client) FetchFileAtRef(repo, path, ref string) ([]byte, bool, error)
- func (c *Client) FetchRemoteConfigRefs(repo, pr string) (config.RemoteConfigRefs, error)
- type PRFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct{}
func (*Client) FetchChangedFileContents ¶
func (*Client) FetchFileAtRef ¶ added in v1.1.0
FetchFileAtRef fetches a file from the repository at a specific ref. Returns (nil, false, nil) when the file is not found (404).
func (*Client) FetchRemoteConfigRefs ¶ added in v1.1.0
func (c *Client) FetchRemoteConfigRefs(repo, pr string) (config.RemoteConfigRefs, error)
FetchRemoteConfigRefs returns repository and PR refs for remote config loading.
Click to show internal directories.
Click to hide internal directories.