actions

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePullRequest

func CreatePullRequest(ctx context.Context, repo *git.Repo, client *gh.Client, opts CreatePullRequestOpts) (*gh.PullRequest, error)

CreatePullRequest creates a pull request on GitHub for the current branch, if one doesn't already exist.

func Push

func Push(repo *git.Repo, opts PushOpts) error

Push pushes the current branch to the Git origin. It does not check out the given branch.

Types

type CreatePullRequestOpts

type CreatePullRequestOpts struct {
	Title string
	Body  string

	// If true, do not push the branch to GitHub
	SkipPush bool
	// If true, create a PR even if we think one already exists
	Force bool
}

type ForceOpt

type ForceOpt int
const (
	NoForce ForceOpt = iota
	// ForceWithLease indicates that the push should use the --force-with-lease
	// option which instructs Git that it should only force push to the remote
	// branch if its current HEAD matches what we think it should be.
	ForceWithLease ForceOpt = iota
	ForcePush      ForceOpt = iota
)

type PushOpts

type PushOpts struct {
	Force ForceOpt
}

Jump to

Keyboard shortcuts

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