Skip to content

Commit

Permalink
Merge pull request jenkins-x#108 from abayer/add-name-to-bbc-status
Browse files Browse the repository at this point in the history
chore: Add name field to BitBucket Cloud commit status creation
  • Loading branch information
jenkins-x-bot authored Apr 27, 2020
2 parents 2a89b51 + 7bc8e5a commit af36b23
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions scm/driver/bitbucket/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func (s *repositoryService) CreateStatus(ctx context.Context, repo, ref string,
State: convertFromState(input.State),
Desc: input.Desc,
Key: input.Label,
Name: input.Label,
URL: input.Target,
}
out := new(status)
Expand Down
1 change: 1 addition & 0 deletions scm/driver/bitbucket/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func TestStatusCreate(t *testing.T) {

gock.New("https://api.bitbucket.org").
Post("/2.0/repositories/atlassian/stash-example-plugin/commit/a6e5e7d797edf751cbd839d6bd4aef86c941eec9/statuses/build").
File("testdata/status_input.json").
Reply(201).
Type("application/json").
File("testdata/status.json")
Expand Down
7 changes: 7 additions & 0 deletions scm/driver/bitbucket/testdata/status_input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"state": "SUCCESSFUL",
"name": "continuous-integration/drone",
"key": "continuous-integration/drone",
"description": "Build has completed successfully",
"url": "https://ci.example.com/1000/output"
}

0 comments on commit af36b23

Please sign in to comment.