commitpr

command
v17.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

The commitpr command utilizes go-github as a CLI tool for pushing files to a branch and creating a pull request from it. It takes an auth token as an environment variable and creates the commit and the PR under the account affiliated with that token.

The purpose of this example is to show how to use refs, trees and commits to create commits and pull requests.

Note, if you want to push a single file, you probably prefer to use the content API. An example is available here: https://godoc.org/github.com/google/go-github/github#example-RepositoriesService-CreateFile

Note, for this to work at least 1 commit is needed, so you if you use this after creating a repository you might want to make sure you set `AutoInit` to `true`.

Jump to

Keyboard shortcuts

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