Skip to content

Commit 0c3cd2f

Browse files
feat(api): api update
1 parent 804a910 commit 0c3cd2f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-310a2e25c41149fe061e3c53d969392ca8bf4335762a32ce5b5d376990f4037d.yml
3-
openapi_spec_hash: 0399fa6824e38cdb61fc9e8bd55d9622
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-3ecceed264a62adba59c787f105549f62109739328db523366159f22c2ed1ee6.yml
3+
openapi_spec_hash: 80b5362bf4f1ce98bc016406dc7e1bed
44
config_hash: 34780c6a4340e5f9ddfb18f6b534eea5

commit.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,11 @@ type CommitPromoteAllParams struct {
368368
// “production” (in that order), setting this param to “production” will promote
369369
// all commits not currently in production from staging.
370370
//
371-
// Note: This must be a non-development environment.
371+
// When this param is set to `"development"`, the `"branch"` param must be
372+
// provided.
372373
ToEnvironment string `query:"to_environment,required" json:"-"`
374+
// The slug of the branch to promote all changes from.
375+
Branch param.Opt[string] `query:"branch,omitzero" json:"-"`
373376
// Filter commits to promote by resource identifier. Must be used together with
374377
// resource_type.
375378
ResourceID param.Opt[string] `query:"resource_id,omitzero" json:"-"`

commit_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ func TestCommitPromoteAllWithOptionalParams(t *testing.T) {
116116
)
117117
_, err := client.Commits.PromoteAll(context.TODO(), knockmapi.CommitPromoteAllParams{
118118
ToEnvironment: "to_environment",
119+
Branch: knockmapi.String("branch"),
119120
ResourceID: knockmapi.String("resource_id"),
120121
ResourceType: knockmapi.CommitPromoteAllParamsResourceTypeUnion{
121122
OfCommitPromoteAllsResourceTypeString: knockmapi.String("audience"),

0 commit comments

Comments
 (0)