Skip to content

Commit 9735ce4

Browse files
committed
assign url parameter to link field in status input instead of target
Signed-off-by: Zaki Shaikh <[email protected]>
1 parent 42ed357 commit 9735ce4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

scm/driver/stash/repo.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,15 @@ func (s *repositoryService) CreateStatus(ctx context.Context, repo, ref string,
451451
State: convertFromState(input.State),
452452
Key: input.Label,
453453
Name: input.Label,
454-
URL: input.Target,
454+
URL: input.Link,
455455
Desc: input.Desc,
456456
}
457457
res, err := s.client.do(ctx, "POST", path, in, nil)
458458
return &scm.Status{
459-
State: input.State,
460-
Label: input.Label,
461-
Desc: input.Desc,
462-
Target: input.Target,
459+
State: input.State,
460+
Label: input.Label,
461+
Desc: input.Desc,
462+
Link: input.Link,
463463
}, res, err
464464
}
465465

scm/driver/stash/repo_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ func TestStatusCreate(t *testing.T) {
429429
Reply(204)
430430

431431
in := &scm.StatusInput{
432-
Desc: "Build has completed successfully",
433-
Label: "continuous-integration/drone/pull",
434-
State: scm.StateSuccess,
435-
Target: "https://ci.example.com/1000/output",
432+
Desc: "Build has completed successfully",
433+
Label: "continuous-integration/drone/pull",
434+
State: scm.StateSuccess,
435+
Link: "https://ci.example.com/1000/output",
436436
}
437437

438438
client, _ := New("http://example.com:7990")

0 commit comments

Comments
 (0)