Documentation ¶
Index ¶
- Variables
- type CreateBranchInput
- type CreatePullRequestInput
- type CreatePullRequestOutput
- type GitHub
- func (c *GitHub) CreateBlob(ctx context.Context, n git.NewBlob) (git.BlobSHA, error)
- func (c *GitHub) CreateBranch(ctx context.Context, in CreateBranchInput) error
- func (c *GitHub) CreateCommit(ctx context.Context, n git.NewCommit) (git.CommitSHA, error)
- func (c *GitHub) CreateFork(ctx context.Context, id git.RepositoryID) (*git.RepositoryID, error)
- func (c *GitHub) CreatePullRequest(ctx context.Context, in CreatePullRequestInput) (*CreatePullRequestOutput, error)
- func (c *GitHub) CreateRelease(ctx context.Context, r git.Release) (*git.Release, error)
- func (c *GitHub) CreateReleaseAsset(ctx context.Context, a git.ReleaseAsset) error
- func (c *GitHub) CreateTree(ctx context.Context, n git.NewTree) (git.TreeSHA, error)
- func (c *GitHub) GetReleaseByTagOrNil(ctx context.Context, repo git.RepositoryID, tag git.TagName) (*git.Release, error)
- func (c *GitHub) QueryCommit(ctx context.Context, in QueryCommitInput) (*QueryCommitOutput, error)
- func (c *GitHub) QueryDefaultBranch(ctx context.Context, in QueryDefaultBranchInput) (*QueryDefaultBranchOutput, error)
- func (c *GitHub) QueryForCommit(ctx context.Context, in QueryForCommitInput) (*QueryForCommitOutput, error)
- func (c *GitHub) QueryForPullRequest(ctx context.Context, in QueryForPullRequestInput) (*QueryForPullRequestOutput, error)
- func (c *GitHub) RequestPullRequestReview(ctx context.Context, in RequestPullRequestReviewInput) error
- func (c *GitHub) UpdateBranch(ctx context.Context, in UpdateBranchInput) error
- type Interface
- type InternalBranchNodeID
- type InternalRepositoryNodeID
- type QueryCommitInput
- type QueryCommitOutput
- type QueryDefaultBranchInput
- type QueryDefaultBranchOutput
- type QueryForCommitInput
- type QueryForCommitOutput
- type QueryForPullRequestInput
- type QueryForPullRequestOutput
- type RequestPullRequestReviewInput
- type UpdateBranchInput
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CreateBranchInput ¶
type CreateBranchInput struct { RepositoryNodeID InternalRepositoryNodeID BranchName git.BranchName CommitSHA git.CommitSHA }
type CreatePullRequestInput ¶
type CreatePullRequestInput struct { BaseRepository git.RepositoryID BaseBranchName git.BranchName BaseRepositoryNodeID InternalRepositoryNodeID HeadRepository git.RepositoryID HeadBranchName git.BranchName Title string Body string // optional Draft bool }
type CreatePullRequestOutput ¶
type GitHub ¶
GitHub provides GitHub API access.
func (*GitHub) CreateBlob ¶
CreateBlob creates a blob and returns SHA of it.
func (*GitHub) CreateBranch ¶
func (c *GitHub) CreateBranch(ctx context.Context, in CreateBranchInput) error
CreateBranch creates a branch and returns nil or an error.
func (*GitHub) CreateCommit ¶
CreateCommit creates a commit and returns SHA of it.
func (*GitHub) CreateFork ¶
func (c *GitHub) CreateFork(ctx context.Context, id git.RepositoryID) (*git.RepositoryID, error)
CreateFork creates a fork of the repository. This returns ID of the fork.
func (*GitHub) CreatePullRequest ¶
func (c *GitHub) CreatePullRequest(ctx context.Context, in CreatePullRequestInput) (*CreatePullRequestOutput, error)
func (*GitHub) CreateRelease ¶
CreateRelease creates a release.
func (*GitHub) CreateReleaseAsset ¶
CreateRelease creates a release asset.
func (*GitHub) CreateTree ¶
CreateTree creates a tree and returns SHA of it.
func (*GitHub) GetReleaseByTagOrNil ¶
func (c *GitHub) GetReleaseByTagOrNil(ctx context.Context, repo git.RepositoryID, tag git.TagName) (*git.Release, error)
GetReleaseByTagOrNil returns the release associated to the tag. It returns nil if it does not exist.
func (*GitHub) QueryCommit ¶
func (c *GitHub) QueryCommit(ctx context.Context, in QueryCommitInput) (*QueryCommitOutput, error)
QueryCommit returns the commit.
func (*GitHub) QueryDefaultBranch ¶
func (c *GitHub) QueryDefaultBranch(ctx context.Context, in QueryDefaultBranchInput) (*QueryDefaultBranchOutput, error)
QueryDefaultBranch returns the default branch names. You can set both repositories or either repository.
func (*GitHub) QueryForCommit ¶
func (c *GitHub) QueryForCommit(ctx context.Context, in QueryForCommitInput) (*QueryForCommitOutput, error)
QueryForCommit returns the repository for creating or updating the branch.
func (*GitHub) QueryForPullRequest ¶
func (c *GitHub) QueryForPullRequest(ctx context.Context, in QueryForPullRequestInput) (*QueryForPullRequestOutput, error)
QueryForPullRequest performs the query for creating a pull request.
func (*GitHub) RequestPullRequestReview ¶
func (c *GitHub) RequestPullRequestReview(ctx context.Context, in RequestPullRequestReviewInput) error
func (*GitHub) UpdateBranch ¶
func (c *GitHub) UpdateBranch(ctx context.Context, in UpdateBranchInput) error
UpdateBranch updates the branch and returns nil or an error.
type Interface ¶
type Interface interface { CreateFork(ctx context.Context, id git.RepositoryID) (*git.RepositoryID, error) QueryForCommit(ctx context.Context, in QueryForCommitInput) (*QueryForCommitOutput, error) CreateBranch(ctx context.Context, in CreateBranchInput) error UpdateBranch(ctx context.Context, in UpdateBranchInput) error CreateCommit(ctx context.Context, commit git.NewCommit) (git.CommitSHA, error) QueryCommit(ctx context.Context, in QueryCommitInput) (*QueryCommitOutput, error) CreateTree(ctx context.Context, tree git.NewTree) (git.TreeSHA, error) CreateBlob(ctx context.Context, blob git.NewBlob) (git.BlobSHA, error) GetReleaseByTagOrNil(ctx context.Context, repo git.RepositoryID, tag git.TagName) (*git.Release, error) CreateRelease(ctx context.Context, r git.Release) (*git.Release, error) CreateReleaseAsset(ctx context.Context, a git.ReleaseAsset) error QueryForPullRequest(ctx context.Context, in QueryForPullRequestInput) (*QueryForPullRequestOutput, error) CreatePullRequest(ctx context.Context, in CreatePullRequestInput) (*CreatePullRequestOutput, error) RequestPullRequestReview(ctx context.Context, in RequestPullRequestReviewInput) error QueryDefaultBranch(ctx context.Context, in QueryDefaultBranchInput) (*QueryDefaultBranchOutput, error) }
type InternalBranchNodeID ¶
type QueryCommitInput ¶
type QueryCommitInput struct { Repository git.RepositoryID CommitSHA git.CommitSHA }
type QueryCommitOutput ¶
type QueryCommitOutput struct {
ChangedFiles int
}
type QueryDefaultBranchInput ¶
type QueryDefaultBranchInput struct { BaseRepository git.RepositoryID HeadRepository git.RepositoryID }
type QueryDefaultBranchOutput ¶
type QueryDefaultBranchOutput struct { BaseDefaultBranchName git.BranchName HeadDefaultBranchName git.BranchName }
type QueryForCommitInput ¶
type QueryForCommitInput struct { ParentRepository git.RepositoryID ParentRef git.RefName // optional TargetRepository git.RepositoryID TargetBranchName git.BranchName // optional }
type QueryForCommitOutput ¶
type QueryForCommitOutput struct { CurrentUserName string ParentDefaultBranchCommitSHA git.CommitSHA ParentDefaultBranchTreeSHA git.TreeSHA ParentRefCommitSHA git.CommitSHA // empty if the parent ref does not exist ParentRefTreeSHA git.TreeSHA // empty if the parent ref does not exist TargetRepositoryNodeID InternalRepositoryNodeID TargetBranchNodeID InternalBranchNodeID TargetBranchCommitSHA git.CommitSHA // empty if the branch does not exist TargetBranchTreeSHA git.TreeSHA // empty if the branch does not exist }
func (*QueryForCommitOutput) TargetBranchExists ¶
func (q *QueryForCommitOutput) TargetBranchExists() bool
type QueryForPullRequestInput ¶
type QueryForPullRequestInput struct { BaseRepository git.RepositoryID BaseBranchName git.BranchName HeadRepository git.RepositoryID HeadBranchName git.BranchName ReviewerUser string // optional }
type UpdateBranchInput ¶
type UpdateBranchInput struct { BranchRefNodeID InternalBranchNodeID CommitSHA git.CommitSHA Force bool }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
mock_client
Package mock_client is a generated GoMock package.
|
Package mock_client is a generated GoMock package. |
Package mock_github is a generated GoMock package.
|
Package mock_github is a generated GoMock package. |