Documentation ¶
Index ¶
- func CreatePR(ctx context.Context, client *github.Client, prRepoOwner string, prRepo string, ...) (err error)
- func GetRef(ctx context.Context, client *github.Client, sourceOwner string, ...) (ref *github.Reference, err error)
- func GetTree(ctx context.Context, client *github.Client, ref *github.Reference, ...) (tree *github.Tree, err error)
- func PushCommit(ctx context.Context, client *github.Client, ref *github.Reference, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePR ¶
func CreatePR(ctx context.Context, client *github.Client, prRepoOwner string, prRepo string, sourceOwner string, commitBranch string, sourceRepo string, prSubject string, prBranch string, prDescription string) (err error)
createPR creates a pull request. Based on: https://godoc.org/github.com/google/go-github/github#example-PullRequestsService-Create
func GetRef ¶
func GetRef(ctx context.Context, client *github.Client, sourceOwner string, sourceRepo string, timeStamp string, commitBranch string, baseBranch string) (ref *github.Reference, err error)
GetRef returns the commit branch reference object if it exists or creates it from the base branch before returning it.
func GetTree ¶
func GetTree(ctx context.Context, client *github.Client, ref *github.Reference, sourceFiles string, sourceOwner string, sourceRepo string) (tree *github.Tree, err error)
GetTree generates the tree to commit based on the given files and the commit of the ref you got in getRef.
func PushCommit ¶
func PushCommit(ctx context.Context, client *github.Client, ref *github.Reference, tree *github.Tree, sourceOwner string, sourceRepo string, authorName string, authorEmail string, commitMessage string) (err error)
pushCommit creates the commit in the given reference using the given tree.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.