Documentation
¶
Index ¶
- func Checkout(client *github.Client, ref *plumbing.Reference, tree *git.Worktree, ...) (plumbing.ReferenceName, error)
- func Clone(repo *github.Repository, token *github.Client) (string, *git.Repository, error)
- func PushChanges(client *github.Client, branch string, tree *git.Worktree, repo, message string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkout ¶
func Checkout(client *github.Client, ref *plumbing.Reference, tree *git.Worktree, remote *github.Repository, local *git.Repository) (plumbing.ReferenceName, error)
Checkout takes a GitHub client, a git reference and tree, along with local and remote repository. It will create a branch with the hardcoded name 'update', and will output a new git reference.
func Clone ¶
func Clone(repo *github.Repository, token *github.Client) (string, *git.Repository, error)
Clone takes a GitHub repository and client. It will look to create a local copy of the repository in the `tmp/` directory. It will then output the repository directory, name and an error if there is one.
func PushChanges ¶
func PushChanges(client *github.Client, branch string, tree *git.Worktree, repo, message string, localRepo *git.Repository, remoteRepo *github.Repository) error
PushChanges takes a GitHub client, a branch, tree and repository. It first adds all changes to the git staging area, then commits, pushes and creates a PR, outputting any errors.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.