gitutils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(r *git.Repository, branch string) error

Switch to a given branch.

func CheckoutCreate

func CheckoutCreate(r *git.Repository, branch string) error

Create a new branch and switch to it, based off the current branch.

func ChooseRemote

func ChooseRemote(rs []*git.Remote) *git.Remote

Pick a suitable "remote" to push to later, defaulting to one that was created previously by this tool.

func Commit

func Commit(r *git.Repository, name string, email string, files []string) error

Commit the changes in some given filepaths.

func PullMaster added in v1.0.1

func PullMaster(w *git.Worktree, remote string, user string, token string) error

Pull the `master` branch.

func PullRequest

func PullRequest(c *github.Client, owner string, repo string, branch string) (int, error)

Open a pull request, and return its number.

func Push

func Push(r *git.Repository, remote string, branch string, user string, token string) error

Push the given branch.

func PushableRemote

func PushableRemote(repo *git.Repository) (string, string, error)

Fetch or create an HTTP-based remote that we can used to push via the given Github API token. Yields the name of the remote, as well as the owner of the repo.

func Recent

func Recent(client *github.Client, owner, repo string) (string, error)

Given an activated client and a Github project, look up the version of its most recent release.

Types

This section is empty.

Jump to

Keyboard shortcuts

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