Skip to content

Commit 7d5ba04

Browse files
committed
fix: fix custom code
1 parent 8500bf3 commit 7d5ba04

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

build.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,55 +27,55 @@ func getCompletedTargets(buildRes stainlessv0.BuildObject) []targetInfo {
2727
targets := []targetInfo{}
2828

2929
// Check each target and add it to the list if it's completed or in postgen
30-
if buildRes.Targets.JSON.Node.IsPresent() {
30+
if buildRes.Targets.JSON.Node.Valid() {
3131
targets = append(targets, targetInfo{
3232
name: "node",
3333
status: buildRes.Targets.Node.Status,
3434
})
3535
}
36-
if buildRes.Targets.JSON.Typescript.IsPresent() {
36+
if buildRes.Targets.JSON.Typescript.Valid() {
3737
targets = append(targets, targetInfo{
3838
name: "typescript",
3939
status: buildRes.Targets.Typescript.Status,
4040
})
4141
}
42-
if buildRes.Targets.JSON.Python.IsPresent() {
42+
if buildRes.Targets.JSON.Python.Valid() {
4343
targets = append(targets, targetInfo{
4444
name: "python",
4545
status: buildRes.Targets.Python.Status,
4646
})
4747
}
48-
if buildRes.Targets.JSON.Go.IsPresent() {
48+
if buildRes.Targets.JSON.Go.Valid() {
4949
targets = append(targets, targetInfo{
5050
name: "go",
5151
status: buildRes.Targets.Go.Status,
5252
})
5353
}
54-
if buildRes.Targets.JSON.Cli.IsPresent() {
54+
if buildRes.Targets.JSON.Cli.Valid() {
5555
targets = append(targets, targetInfo{
5656
name: "cli",
5757
status: buildRes.Targets.Cli.Status,
5858
})
5959
}
60-
if buildRes.Targets.JSON.Kotlin.IsPresent() {
60+
if buildRes.Targets.JSON.Kotlin.Valid() {
6161
targets = append(targets, targetInfo{
6262
name: "kotlin",
6363
status: buildRes.Targets.Kotlin.Status,
6464
})
6565
}
66-
if buildRes.Targets.JSON.Java.IsPresent() {
66+
if buildRes.Targets.JSON.Java.Valid() {
6767
targets = append(targets, targetInfo{
6868
name: "java",
6969
status: buildRes.Targets.Java.Status,
7070
})
7171
}
72-
if buildRes.Targets.JSON.Ruby.IsPresent() {
72+
if buildRes.Targets.JSON.Ruby.Valid() {
7373
targets = append(targets, targetInfo{
7474
name: "ruby",
7575
status: buildRes.Targets.Ruby.Status,
7676
})
7777
}
78-
if buildRes.Targets.JSON.Terraform.IsPresent() {
78+
if buildRes.Targets.JSON.Terraform.Valid() {
7979
targets = append(targets, targetInfo{
8080
name: "terraform",
8181
status: buildRes.Targets.Terraform.Status,

projectbranch.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ func handleProjectsBranchesRetrieve(ctx context.Context, cmd *cli.Command) error
7676

7777
res, err := cc.client.Projects.Branches.Get(
7878
context.TODO(),
79-
cmd.Value("project").(string),
8079
cmd.Value("branch").(string),
80+
stainlessv0.ProjectBranchGetParams {
81+
Project: cmd.Value("project").(string),
82+
},
8183
option.WithMiddleware(cc.AsMiddleware()),
8284
)
8385
if err != nil {

0 commit comments

Comments
 (0)