Documentation
¶
Index ¶
- func CachePullRequestsLocally(client *gh.Client, outputDir, repo string, input chan []*github.PullRequest, ...)
- func FetchPullRequests(client *gh.Client, repo string, input chan *github.PullRequest) error
- func GetPullRequestComments(client *gh.Client, owner, repoName string, number int) ([]*github.IssueComment, error)
- func GetPullRequestLineComments(client *gh.Client, owner, repoName string, number int) ([]*github.PullRequestComment, error)
- func WriteMetadataFile(client *gh.Client, outputDir string, repo string, pr *github.PullRequest) (string, error)
- func WritePatchFile(client *gh.Client, outputDir string, pr *github.PullRequest) (string, error)
- type Comment
- type Comments
- type OfflineStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachePullRequestsLocally ¶
func CachePullRequestsLocally(client *gh.Client, outputDir, repo string, input chan []*github.PullRequest, output chan OfflineStatusResponse)
func FetchPullRequests ¶
func GetPullRequestComments ¶
func WriteMetadataFile ¶
func WriteMetadataFile(client *gh.Client, outputDir string, repo string, pr *github.PullRequest) (string, error)
Writes a file containing metadata for
func WritePatchFile ¶
Copies the content of the Patch URL for the PR down to a local file called <prNumber>.patch.
Types ¶
type OfflineStatusResponse ¶
Once the PR is processed, a corresponding struct of this type is created to convey information about where the file went, whether it was successful, etc.
func WritePullRequest ¶
func WritePullRequest(client *gh.Client, outputDir string, repo string, pr *github.PullRequest) OfflineStatusResponse
Writes a single pull request data on the local disk. It pulls down:
- A `.patch` file for the pull request.
- A metadata file, preferably in Markdown or something human-readable. - Username of author - PR reviews & comments - PR comment chain