Documentation ¶
Index ¶
- type BranchShas
- type GitOperations
- func (g *GitOperations) CloneRepo(ctx context.Context) error
- func (g *GitOperations) GetBranchShas(ctx context.Context, branches []string) (map[string]*BranchShas, error)
- func (g *GitOperations) GetShaTime(ctx context.Context, sha string) (v1.Time, error)
- func (g *GitOperations) IsPullRequestRequired(ctx context.Context, environmentNextBranch, environmentBranch string) (bool, error)
- func (g *GitOperations) PromoteEnvironmentWithMerge(ctx context.Context, environmentBranch, environmentNextBranch string) error
- type HydratorMetadataFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchShas ¶
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 (*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 ¶
Click to show internal directories.
Click to hide internal directories.