git

package
v0.0.0-...-0f4a8a0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0, BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMainReferenceName plumbing.ReferenceName = "refs/heads/main"
	OriginName               string                 = "origin"

	MainBranch RefName = "main"
)

Variables

This section is empty.

Functions

func AnnotateCommitMessage

func AnnotateCommitMessage(message string, annotation *gitAnnotation) (string, error)

AnnotateCommitMessage adds the gitAnnotation to the commit message.

Types

type GitRepository

type GitRepository interface {
	List(ctx context.Context, ref string, listFn ListFunc) error
	Commit(ctx context.Context, ref, packageName, workspaceName, revision string, resources map[string]string) error
	Push(ctx context.Context, ref string) error
}

func OpenRepository

func OpenRepository(ctx context.Context, root string, repoCfg *configv1alpha1.GitRepository, opts *Options) (GitRepository, error)

type ListFunc

type ListFunc func(ctx context.Context, tree *object.Tree) error

type Options

type Options struct {
	CredentialResolver auth.CredentialResolver
	UserInfoProvider   auth.UserInfoProvider
}

type RefName

type RefName string

RefName represents a relative reference name (i.e. 'main', 'drafts/bucket/v1') and supports transformation to the ReferenceName in local (cached) repository (those references are in the form 'refs/remotes/origin/...') or in the remote repository (those references are in the form 'refs/heads/...').

func (RefName) ForceFetchSpec

func (b RefName) ForceFetchSpec() config.RefSpec

func (RefName) RefInLocal

func (b RefName) RefInLocal() plumbing.ReferenceName

func (RefName) RefInRemote

func (b RefName) RefInRemote() plumbing.ReferenceName

func (RefName) TagInLocal

func (b RefName) TagInLocal() plumbing.ReferenceName

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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