Documentation
¶
Index ¶
- Constants
- Variables
- func Any[T any](s []T, f func(T) bool) bool
- func CheckoutHash(wt *git.Worktree, hash plumbing.Hash) error
- func Commit(wt *git.Worktree, shouldCherryPick bool, message string, paths ...string) (plumbing.Hash, error)
- func CreateBranch(r *git.Repository, branch string, hash plumbing.Hash) error
- func DeleteBranch(r *git.Repository, branch string) error
- func DoOnBranch(r *git.Repository, wt *git.Worktree, branch string, f WorktreeFunc) error
- func DoOnWorktree(wt *git.Worktree, f WorktreeFunc) error
- func ForEachChart(pkg *charts.Package, pkgFs billy.Filesystem, fn ChartValidateFunc) error
- func GetLocalBranchRefName(branch string) plumbing.ReferenceName
- func GetRelaventUpstreamChange(upstream puller.Puller) string
- func GetRemoteBranchRefName(branch, remote string) plumbing.ReferenceName
- func GetUpdateExpression(upstream puller.Puller) string
- func IsWorktreeClean(wt *git.Worktree) (bool, error)
- func SwitchToBranch(wt *git.Worktree, branch string) error
- func ToPtr[T any](t T) *T
- func UpstreamRef(upstream options.UpstreamOptions) string
- func ValidateHelmLint(pkg *charts.Package, wt *git.Worktree, pkgFs billy.Filesystem) error
- func ValidateWorktree(pkg *charts.Package, wt *git.Worktree, _ billy.Filesystem) error
- type Backup
- type ChartValidateFunc
- type FilesystemBackup
- type NoopBackup
- type Options
- type PackageValidateFunc
- type Rebase
- type ValidateError
- type WorktreeFunc
Constants ¶
View Source
const ( // ChartsStagingBranchName is the name of the branch used to stage changes for user interaction / review. ChartsStagingBranchName = "charts-staging" // ChartsQuarantineBranchName is the name of the "working" branch where the incoming changes are applied. ChartsQuarantineBranchName = "quarantine" // RebaseBackupDir is the directory where the charts are backed up to. RebaseBackupDir = ".rebase-backup" )
Variables ¶
View Source
var ( // AllowedDirectories is the list of directories that are allowed to be untracked in a repository wiuthout being considered dirty. AllowedDirectories = []string{".charts-build-scripts"} )
Functions ¶
func CheckoutHash ¶
func CreateBranch ¶
CreateBranch creates a new branch with the given hash as the head, or the current HEAD hash if empty.
func DeleteBranch ¶
func DoOnBranch ¶
func DoOnBranch(r *git.Repository, wt *git.Worktree, branch string, f WorktreeFunc) error
func DoOnWorktree ¶
func DoOnWorktree(wt *git.Worktree, f WorktreeFunc) error
func ForEachChart ¶
func ForEachChart(pkg *charts.Package, pkgFs billy.Filesystem, fn ChartValidateFunc) error
func GetLocalBranchRefName ¶
func GetLocalBranchRefName(branch string) plumbing.ReferenceName
GetLocalBranchRefName returns the reference name of a given local branch
func GetRemoteBranchRefName ¶
func GetRemoteBranchRefName(branch, remote string) plumbing.ReferenceName
GetRemoteBranchRefName returns the reference name of a given remote branch
func GetUpdateExpression ¶
todo: should just replace everything or take an upstream delta
func IsWorktreeClean ¶
func SwitchToBranch ¶
func UpstreamRef ¶
func UpstreamRef(upstream options.UpstreamOptions) string
func ValidateHelmLint ¶
func ValidateWorktree ¶
Types ¶
type ChartValidateFunc ¶
ChartValidateFunc is a function that verifies a chart using the provided filesystem.
type FilesystemBackup ¶
type FilesystemBackup struct { Sources []string Destination string // contains filtered or unexported fields }
func (*FilesystemBackup) Backup ¶
func (b *FilesystemBackup) Backup() error
func (*FilesystemBackup) Close ¶
func (b *FilesystemBackup) Close() error
type NoopBackup ¶
type NoopBackup struct{}
func (*NoopBackup) Backup ¶
func (b *NoopBackup) Backup() error
func (*NoopBackup) Close ¶
func (b *NoopBackup) Close() error
type PackageValidateFunc ¶
PackageValidateFunc is a function that verifies a package using the provided filesystem.
func ValidateImagesInNamespaceFactory ¶ added in v0.1.8
func ValidateImagesInNamespaceFactory(namespace string) PackageValidateFunc
func ValidatePatternNotFoundFactory ¶
func ValidatePatternNotFoundFactory(pattern string) PackageValidateFunc
type Rebase ¶
type Rebase struct { Options Package *charts.Package RootFs billy.Filesystem PkgFs billy.Filesystem Iter iter.UpstreamIter // contains filtered or unexported fields }
type ValidateError ¶
type ValidateError struct {
// contains filtered or unexported fields
}
func (ValidateError) Error ¶
func (e ValidateError) Error() string
func (ValidateError) Is ¶
func (e ValidateError) Is(err error) bool
type WorktreeFunc ¶
type WorktreeFunc func(wt *git.Worktree) error
Click to show internal directories.
Click to hide internal directories.