Skip to content

Commit 6c118e0

Browse files
committed
refactor: rename getCompletedTargets to getTargetInfo
1 parent 68e8d39 commit 6c118e0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/cmd/build.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ func processSingleTarget(target string) (string, string) {
107107
return targetName, targetPath
108108
}
109109

110-
// getCompletedTargets extracts completed targets from a build response
111-
func getCompletedTargets(buildRes stainless.BuildObject) []targetInfo {
110+
// getTargetInfo extracts completed targets from a build response
111+
func getTargetInfo(buildRes stainless.BuildObject) []targetInfo {
112112
targets := []targetInfo{}
113113

114114
// Check each target and add it to the list if it's completed or in postgen
@@ -191,7 +191,7 @@ func waitForBuildCompletion(ctx context.Context, client stainless.Client, buildI
191191
return nil, fmt.Errorf("build polling failed: %v", err)
192192
}
193193

194-
targets := getCompletedTargets(*buildRes)
194+
targets := getTargetInfo(*buildRes)
195195
allCompleted := true
196196

197197
for _, target := range targets {
@@ -505,7 +505,7 @@ func handleBuildsRetrieve(ctx context.Context, cmd *cli.Command) error {
505505
// pullBuildOutputs pulls the outputs for a completed build
506506
func pullBuildOutputs(ctx context.Context, client stainless.Client, res stainless.BuildObject, targetPaths map[string]string, pullGroup *Group) error {
507507
// Get all targets
508-
allTargets := getCompletedTargets(res)
508+
allTargets := getTargetInfo(res)
509509

510510
// Filter to only completed targets
511511
var targets []string

pkg/cmd/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ func getAvailableTargets(ctx context.Context, client stainless.Client, projectNa
571571
}
572572

573573
// Extract target names from build
574-
buildTargets := getCompletedTargets(*buildRes)
574+
buildTargets := getTargetInfo(*buildRes)
575575
if len(buildTargets) == 0 {
576576
return createTargetOptions(allTargets)
577577
}

0 commit comments

Comments
 (0)