git

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentBranch

func GetCurrentBranch() (string, error)

func GetRemoteURL

func GetRemoteURL() (string, error)

func RepoDataIncludeBranchDescription added in v0.1.31

func RepoDataIncludeBranchDescription(params *repoDataParams)

func RepoDataIncludeCommitMetadata added in v0.1.31

func RepoDataIncludeCommitMetadata(params *repoDataParams)

func ResolveBranchName

func ResolveBranchName(rev string, excludeBranch *string) (*branchNameResolution, error)

func ResolveCommitRef added in v0.1.31

func ResolveCommitRef(commitRef string) (string, error)

func ResolveRev added in v0.1.2

func ResolveRev(rev string) (string, error)

Types

type BranchDescription

type BranchDescription struct {
	Title string
	Body  string
	PrURL string
}

func NewBranchDescription

func NewBranchDescription(firstLine string, remainingLines []string) *BranchDescription

func (*BranchDescription) String

func (b *BranchDescription) String() string

type RepoData

type RepoData struct {
	MasterBranch   string
	BranchRootNode *TreeNode
	// Commit hash to node. Each node is unique.
	CommitHashToNode map[string]*TreeNode
	// Branch name to node. Nodes may be duplicated.
	BranchNameToNode map[string]*TreeNode
}

func NewRepoData

func NewRepoData(opts ...RepoDataOption) (*RepoData, error)

type RepoDataOption added in v0.1.31

type RepoDataOption func(params *repoDataParams)

type TreeNode

type TreeNode struct {
	CommitMetadata *commitMetadata
	BranchParent   *TreeNode
	BranchChildren map[string]*TreeNode
}

func (*TreeNode) String added in v0.1.33

func (t *TreeNode) String() string

Jump to

Keyboard shortcuts

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