github

package
v0.0.0-...-b4abb51 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PullRequest

type PullRequest struct {
	// contains filtered or unexported fields
}

PullRequest 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) (*PullRequest, error)

NewGitHubPullRequest returns a new PullRequest service. PullRequest service needs git command in $PATH.

func (*PullRequest) Diff

func (g *PullRequest) Diff(ctx context.Context) ([]byte, error)

Diff returns a diff of PullRequest.

func (*PullRequest) Flush

func (g *PullRequest) Flush(ctx context.Context) error

Flush posts comments which has not been posted yet.

func (*PullRequest) Post

Post accepts a comment and holds it. Flush method actually posts comments to GitHub in parallel.

func (*PullRequest) Strip

func (g *PullRequest) Strip() int

Strip returns 1 as a strip of git diff.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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