Documentation
¶
Index ¶
- func ValidateOptions(options ChangeOptions) error
- type ChangeDetector
- func (cd *ChangeDetector) GetChangedFiles() ([]string, error)
- func (cd *ChangeDetector) GetChangedFilesUnderPath(path string) ([]string, error)
- func (cd *ChangeDetector) IsAnyPathChanged(paths []string) (bool, error)
- func (cd *ChangeDetector) IsIntentFileChanged(intentFile string) (bool, error)
- func (cd *ChangeDetector) IsPathChanged(path string) (bool, error)
- type ChangeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateOptions ¶
func ValidateOptions(options ChangeOptions) error
ValidateOptions validates affected-like option combinations.
Types ¶
type ChangeDetector ¶
type ChangeDetector struct {
// contains filtered or unexported fields
}
ChangeDetector detects files that have changed in git
func NewChangeDetector ¶
func NewChangeDetector(baseBranch string) *ChangeDetector
NewChangeDetector creates a new change detector
func NewChangeDetectorWithOptions ¶
func NewChangeDetectorWithOptions(options ChangeOptions) *ChangeDetector
NewChangeDetectorWithOptions creates a new change detector with explicit options.
func (*ChangeDetector) GetChangedFiles ¶
func (cd *ChangeDetector) GetChangedFiles() ([]string, error)
GetChangedFiles returns files based on Nx-style affected resolution.
func (*ChangeDetector) GetChangedFilesUnderPath ¶
func (cd *ChangeDetector) GetChangedFilesUnderPath(path string) ([]string, error)
GetChangedFilesUnderPath returns files that have changed under a specific path
func (*ChangeDetector) IsAnyPathChanged ¶
func (cd *ChangeDetector) IsAnyPathChanged(paths []string) (bool, error)
IsAnyPathChanged checks if any files under any of the given paths have changed
func (*ChangeDetector) IsIntentFileChanged ¶
func (cd *ChangeDetector) IsIntentFileChanged(intentFile string) (bool, error)
IsIntentFileChanged checks if the intent file itself has changed
func (*ChangeDetector) IsPathChanged ¶
func (cd *ChangeDetector) IsPathChanged(path string) (bool, error)
IsPathChanged checks if any files under a given path have changed
type ChangeOptions ¶
type ChangeOptions struct {
Base string
Head string
Files []string
Uncommitted bool
Untracked bool
}
ChangeOptions defines Nx-style criteria for selecting changed files. Priority follows Nx semantics: 1) files 2) uncommitted 3) untracked 4) base + head 5) base only (committed + uncommitted + untracked) 6) default base (main) + current workspace changes