git

package
v0.1.18980 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Branch added in v0.1.7487

func Branch() string

func Revision added in v0.1.7487

func Revision() string

func Tag added in v0.1.7487

func Tag() string

Types

type Remote

type Remote struct {
	VcsType      VcsType
	Organization string
	Project      string
}

func InferProjectFromGitRemotes

func InferProjectFromGitRemotes() (*Remote, error)

Parse the output of `git remote` to infer what VCS provider is being used by in the current working directory. The assumption is that the 'origin' remote will be a Bitbucket or GitHub project. This matching is a best effort approach, and pull requests are welcome to make it more robust.

type VcsType

type VcsType string
const (
	GitHub    VcsType = "GITHUB"
	Bitbucket VcsType = "BITBUCKET"
)

Jump to

Keyboard shortcuts

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