git

package
v0.0.0-...-9242a3e Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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