diff --git a/builds.go b/builds.go index 3eba890..e6231e9 100644 --- a/builds.go +++ b/builds.go @@ -103,6 +103,8 @@ type BuildsOption struct { // BuildsByRepositoryOption specifies the optional parameters for builds endpoint type BuildsByRepositoryOption struct { + // Filters builds by name of the git branch + BranchName string `url:"branch.name,omitempty"` // The User or Organization that created the build CreatedBy []string `url:"created_by,omitempty,brackets"` // Event that triggered the build diff --git a/builds_integration_test.go b/builds_integration_test.go index 7fc1096..f961c7b 100644 --- a/builds_integration_test.go +++ b/builds_integration_test.go @@ -65,6 +65,7 @@ func TestBuildsService_Integration_ListByRepoId(t *testing.T) { {PreviousState: []string{BuildStatePassed}}, {EventType: []string{BuildEventTypePush}}, {CreatedBy: []string{"shuheiktgwtest"}}, + {BranchName: "master"}, } for i, opt := range cases {