Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.0] - 2026-02-14

### Changed
- Skip expensive target detection (file scanning, taint import checks) for targets excluded by `TARGETS` filter

## [0.6.0] - 2026-02-14

### Added
Expand Down Expand Up @@ -83,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Multi-stage Docker build
- Automated vendor upgrade workflow

[0.7.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.4.0...v0.5.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.7.0
24 changes: 12 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,19 @@ func main() {
}
changedE2E := make(map[string]*TargetResult)

// Parse TARGETS filter early to skip expensive detection for non-matching targets
var targetPatterns []string
if targetsEnv := os.Getenv("TARGETS"); targetsEnv != "" {
targetPatterns = strings.Split(targetsEnv, ",")
}

for _, rp := range rushConfig.Projects {
cfg := rush.LoadProjectConfig(rp.ProjectFolder)

if cfg.IsTarget() {
if len(targetPatterns) > 0 && !matchesTargetFilter(rp.PackageName, targetPatterns) {
continue
}
// Target detection with 4 conditions:
// 1. Direct file changes (outside ignores)
// 2. External dep changes in lockfile
Expand Down Expand Up @@ -312,6 +321,9 @@ func main() {
}
}
} else if cfg.IsVirtualTarget() && cfg.TargetName != nil {
if len(targetPatterns) > 0 && !matchesTargetFilter(*cfg.TargetName, targetPatterns) {
continue
}
// Virtual target: check changeDirs for file changes or tainted imports.
// Normal dirs trigger a full run; fine-grained dirs collect specific affected files.
normalTriggered := false
Expand Down Expand Up @@ -365,18 +377,6 @@ func main() {
return e2eList[i].Name < e2eList[j].Name
})

// Filter targets if TARGETS env is set (comma-delimited, supports * globs)
if targetsEnv := os.Getenv("TARGETS"); targetsEnv != "" {
patterns := strings.Split(targetsEnv, ",")
var filtered []*TargetResult
for _, result := range e2eList {
if matchesTargetFilter(result.Name, patterns) {
filtered = append(filtered, result)
}
}
e2eList = filtered
}

if flagLog {
logf("Affected e2e packages (%d):\n", len(e2eList))
for _, result := range e2eList {
Expand Down