git

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.2

type Config struct {
	Runner runner.Runner
	Token  string
}

Config provides configuration options for the github provider.

type HTTPRoundTripper added in v0.0.3

type HTTPRoundTripper interface {
	RoundTrip(r *http.Request) (*http.Response, error)
}

HTTPRoundTripper defines an interface for HTTP RoundTripper.

type Provider

type Provider struct {
	Config
	Client *http.Client
}

Provider is a git functionality provider.

func NewProvider

func NewProvider(cfg Config) *Provider

NewProvider creates a new git functionality provider.

func (*Provider) GetCurrentBranch added in v0.0.2

func (p *Provider) GetCurrentBranch() (string, error)

GetCurrentBranch gets the current active branch of a repository.

func (*Provider) GetDevTag added in v0.0.3

func (p *Provider) GetDevTag() (string, error)

GetDevTag returns the name of the generated development tag.

func (*Provider) GetLatestRemoteTag

func (p *Provider) GetLatestRemoteTag(owner, repo string) (string, error)

GetLatestRemoteTag gets the latest tag from the given remote git repo.

func (*Provider) GetOwnerAndRepoFromLocal added in v0.0.2

func (p *Provider) GetOwnerAndRepoFromLocal() (string, string, error)

GetOwnerAndRepoFromLocal returns the owner and the repo name from a local git repository.

type VCSProvider added in v0.0.3

type VCSProvider interface {
	GetDevTag() (string, error)
	GetLatestRemoteTag(owner, repo string) (string, error)
	GetOwnerAndRepoFromLocal() (string, string, error)
	GetCurrentBranch() (string, error)
}

VCSProvider adds endpoints for version control related actions.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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