git

package
v0.0.1-rc5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchShas

type BranchShas struct {
	Dry      string
	Hydrated string
}

type GitOperations

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

func NewGitOperations

func NewGitOperations(ctx context.Context, k8sClient client.Client, gap scms.GitOperationsProvider, pathLookup utils.PathLookup, repoRef v1alpha1.ObjectReference, obj v1.Object, pathConext string) (*GitOperations, error)

func (*GitOperations) CloneRepo

func (g *GitOperations) CloneRepo(ctx context.Context) error

CloneRepo clones the gitRepo to a temporary directory if needed does nothing if the repo is already cloned.

func (*GitOperations) GetBranchShas

func (g *GitOperations) GetBranchShas(ctx context.Context, branches []string) (map[string]*BranchShas, error)

func (*GitOperations) GetShaTime

func (g *GitOperations) GetShaTime(ctx context.Context, sha string) (v1.Time, error)

func (*GitOperations) IsPullRequestRequired

func (g *GitOperations) IsPullRequestRequired(ctx context.Context, environmentNextBranch, environmentBranch string) (bool, error)

IsPullRequestRequired will compare the environment branch with the next environment branch and return true if a PR is required. The PR is required if the diff between the two branches contain edits to yaml files.

func (*GitOperations) PromoteEnvironmentWithMerge

func (g *GitOperations) PromoteEnvironmentWithMerge(ctx context.Context, environmentBranch, environmentNextBranch string) error

type HydratorMetadataFile

type HydratorMetadataFile struct {
	Commands []string `json:"commands"`
	DrySHA   string   `json:"drySha"`
}

Jump to

Keyboard shortcuts

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