git

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckoutOptions

type CheckoutOptions struct {
	BranchName string
	Force      bool
	Keep       bool
}

CheckoutOptions are options for the Checkout.

type GitCommiter

type GitCommiter struct {
	// contains filtered or unexported fields
}

GitCommiter provides git functions for CI.

func NewCommiter

func NewCommiter(apiToken string) *GitCommiter

NewCommiter constructs a new GitCommitter.

func (*GitCommiter) Checkout

func (gc *GitCommiter) Checkout(options *CheckoutOptions) error

Checkout checks out a branch.

func (*GitCommiter) Commit

func (gc *GitCommiter) Commit(message string, files ...string) (plumbing.Hash, error)

Commit stages and commits the changes in the working tree.

func (*GitCommiter) Push

func (gc *GitCommiter) Push(options *PushOptions) error

Push pushes commits to a remote.

func (*GitCommiter) Tag

func (gc *GitCommiter) Tag(tagVersion string, hash plumbing.Hash) error

Tag creates a tag.

type PushOptions

type PushOptions struct {
	Remote string
}

PushOptions are options for the Push.

Jump to

Keyboard shortcuts

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