vcs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorWriter added in v0.6.0

type ColorWriter struct {
	Color color.Color
}

ColorWriter writes output to stdout using the chosen color.

func (ColorWriter) Write added in v0.6.0

func (c ColorWriter) Write(p []byte) (int, error)

type Git

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

Git is a version control system supported by gomodbump.

func NewGit

func NewGit(conf GitConfig, authType string) (*Git, error)

NewGit initializes a new VCS manager.

func (*Git) Clone

func (g *Git) Clone(repo *repository.Repository) (*git.Repository, error)

Clone all the repos provided and return the ones that successfully cloned.

func (*Git) DeleteBranch added in v0.6.0

func (g *Git) DeleteBranch(repo *repository.Repository) error

DeleteBranch from remote.

func (*Git) GetSourceBranch

func (g *Git) GetSourceBranch() string

GetSourceBranch returns the source branch to use for creating changes.

func (*Git) GetTargetBranch

func (g *Git) GetTargetBranch() string

GetTargetBranch returns the branch the source branch was checked out from.

func (*Git) Push

func (g *Git) Push(repo *repository.Repository) error

Push changed files.

func (*Git) VCSType

func (g *Git) VCSType() repository.VCS

VCSType returns the VCS type.

type GitConfig

type GitConfig struct {
	SourceBranch      string `yaml:"source_branch"`
	TargetBranch      string `yaml:"target_branch"`
	CommitMessage     string `yaml:"commit_message"`
	CommitAuthorName  string `yaml:"commit_author_name"`
	CommitAuthorEmail string `yaml:"commit_author_email"`
	Insecure          bool   `yaml:"insecure"`
	Username          string `yaml:"-"`
	Password          string `yaml:"-"`
	Token             string `yaml:"-"`
}

GitConfig are the options to use for Git VCS.

Jump to

Keyboard shortcuts

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