Skip to content

Commit 79b5f69

Browse files
feat(api): add disabled parameter to automations update method
1 parent ff7eab3 commit 79b5f69

4 files changed

Lines changed: 22 additions & 3 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cade77d00e2ea53642be459df51982a608717dc6a15fdf5c6403a52571e7709b.yml
3-
openapi_spec_hash: 88a0edaa03c6a9ae7eed84333977bfe2
4-
config_hash: 60242c6ae6fc727bce872753690be6fd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-7b0c078bf03d89222865a5c11f0371cade6476f5348102f3ada80e453a44fc3a.yml
3+
openapi_spec_hash: 88d52b6f3750a4015a926dcb909633fb
4+
config_hash: 69ebf8df948a14a1809ba846a1ec4527

src/gitpod/resources/automations.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def update(
216216
*,
217217
action: Optional[WorkflowActionParam] | Omit = omit,
218218
description: Optional[str] | Omit = omit,
219+
disabled: Optional[bool] | Omit = omit,
219220
executor: Optional[Subject] | Omit = omit,
220221
name: Optional[str] | Omit = omit,
221222
report: Optional[WorkflowActionParam] | Omit = omit,
@@ -294,6 +295,9 @@ def update(
294295
size(this) <= 500
295296
```
296297
298+
disabled: When set, enables or disables the workflow. A disabled workflow will not be
299+
triggered by any automatic trigger and manual starts are rejected.
300+
297301
name:
298302
Name must be between 1 and 80 characters:
299303
@@ -324,6 +328,7 @@ def update(
324328
{
325329
"action": action,
326330
"description": description,
331+
"disabled": disabled,
327332
"executor": executor,
328333
"name": name,
329334
"report": report,
@@ -1115,6 +1120,7 @@ async def update(
11151120
*,
11161121
action: Optional[WorkflowActionParam] | Omit = omit,
11171122
description: Optional[str] | Omit = omit,
1123+
disabled: Optional[bool] | Omit = omit,
11181124
executor: Optional[Subject] | Omit = omit,
11191125
name: Optional[str] | Omit = omit,
11201126
report: Optional[WorkflowActionParam] | Omit = omit,
@@ -1193,6 +1199,9 @@ async def update(
11931199
size(this) <= 500
11941200
```
11951201
1202+
disabled: When set, enables or disables the workflow. A disabled workflow will not be
1203+
triggered by any automatic trigger and manual starts are rejected.
1204+
11961205
name:
11971206
Name must be between 1 and 80 characters:
11981207
@@ -1223,6 +1232,7 @@ async def update(
12231232
{
12241233
"action": action,
12251234
"description": description,
1235+
"disabled": disabled,
12261236
"executor": executor,
12271237
"name": name,
12281238
"report": report,

src/gitpod/types/automation_update_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ class AutomationUpdateParams(TypedDict, total=False):
2525
```
2626
"""
2727

28+
disabled: Optional[bool]
29+
"""When set, enables or disables the workflow.
30+
31+
A disabled workflow will not be triggered by any automatic trigger and manual
32+
starts are rejected.
33+
"""
34+
2835
executor: Optional[Subject]
2936

3037
name: Optional[str]

tests/api_resources/test_automations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
276276
],
277277
},
278278
description="description",
279+
disabled=True,
279280
executor={
280281
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
281282
"principal": "PRINCIPAL_UNSPECIFIED",
@@ -1039,6 +1040,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
10391040
],
10401041
},
10411042
description="description",
1043+
disabled=True,
10421044
executor={
10431045
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
10441046
"principal": "PRINCIPAL_UNSPECIFIED",

0 commit comments

Comments
 (0)