Skip to content

Commit

Permalink
Merge pull request #174 from buildkite/sup-1697-add-username-to-author
Browse files Browse the repository at this point in the history
SUP-1697 Add username to Author struct
  • Loading branch information
lizrabuya authored Jan 17, 2024
2 parents 7a5d72b + ff36eb2 commit c79f80f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions buildkite/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ type BuildsService struct {

// Author of a commit (used in CreateBuild)
type Author struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Email string `json:"email,omitempty" yaml:"email,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Email string `json:"email,omitempty" yaml:"email,omitempty"`
}

// CreateBuild - Create a build.
Expand Down
5 changes: 5 additions & 0 deletions buildkite/builds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ func TestBuildsUnmarshalWebhook(t *testing.T) {
"branch": "master",
"tag": null,
"source": "ui",
"author": {
"username": "foojim",
"name": "Uhh, Jim",
"email": "[email protected]"
},
"creator": {
"id": "foo",
"name": "Uhh, Jim",
Expand Down

0 comments on commit c79f80f

Please sign in to comment.