Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubPullRequest ¶
type GitHubPullRequest struct {
// contains filtered or unexported fields
}
GitHubPullRequest is a comment and diff service for GitHub PullRequest.
API:
https://developer.github.com/v3/pulls/comments/#create-a-comment POST /repos/:owner/:repo/pulls/:number/comments
func NewGitHubPullRequest ¶
func NewGitHubPullRequest(cli *github.Client, owner, repo string, pr int, sha string) (*GitHubPullRequest, error)
NewGitHubPullRequest returns a new GitHubPullRequest service. GitHubPullRequest service needs git command in $PATH.
func (*GitHubPullRequest) Diff ¶
func (g *GitHubPullRequest) Diff(ctx context.Context) ([]byte, error)
Diff returns a diff of PullRequest.
func (*GitHubPullRequest) Flush ¶
func (g *GitHubPullRequest) Flush(ctx context.Context) error
Flush posts comments which has not been posted yet.
func (*GitHubPullRequest) Post ¶
Post accepts a comment and holds it. Flush method actually posts comments to GitHub in parallel.
func (*GitHubPullRequest) Strip ¶
func (g *GitHubPullRequest) Strip() int
Strip returns 1 as a strip of git diff.
Click to show internal directories.
Click to hide internal directories.