Skip to content

Commit 077b662

Browse files
feat(api): add integration_id field, make webhook_id required in pull_request trigger
1 parent ad622d8 commit 077b662

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
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: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c148bac55f33b187604bab867c9b75124734cc8e4e72d4087e5a8e9b7472adff.yml
3-
openapi_spec_hash: b98efd1fad1247c31ca39e482a151040
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5f25564854b84c1757f66d81caaa50f47db40dc697d4cc91877c2f4e59fa16aa.yml
3+
openapi_spec_hash: 132db01aff2713a9a0a4d9e858ec1bba
44
config_hash: 25c7c72de891ed240ee62c4fb9a99756

src/gitpod/types/workflow_trigger.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ class PullRequest(BaseModel):
3131
]
3232
] = None
3333

34+
integration_id: Optional[str] = FieldInfo(alias="integrationId", default=None)
35+
"""
36+
integration_id is the optional ID of an integration that acts as the source of
37+
webhook events. When set, the trigger will be activated when the webhook
38+
receives events.
39+
"""
40+
3441
webhook_id: Optional[str] = FieldInfo(alias="webhookId", default=None)
3542
"""
3643
webhook_id is the optional ID of a webhook that this trigger is bound to. When

src/gitpod/types/workflow_trigger_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class PullRequest(TypedDict, total=False):
2929
]
3030
]
3131

32+
integration_id: Annotated[Optional[str], PropertyInfo(alias="integrationId")]
33+
"""
34+
integration_id is the optional ID of an integration that acts as the source of
35+
webhook events. When set, the trigger will be activated when the webhook
36+
receives events.
37+
"""
38+
3239
webhook_id: Annotated[Optional[str], PropertyInfo(alias="webhookId")]
3340
"""
3441
webhook_id is the optional ID of a webhook that this trigger is bound to. When

tests/api_resources/test_automations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
113113
"manual": {},
114114
"pull_request": {
115115
"events": ["PULL_REQUEST_EVENT_UNSPECIFIED"],
116+
"integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
116117
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
117118
},
118119
"time": {"cron_expression": "cronExpression"},
@@ -256,6 +257,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
256257
"manual": {},
257258
"pull_request": {
258259
"events": ["PULL_REQUEST_EVENT_UNSPECIFIED"],
260+
"integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
259261
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
260262
},
261263
"time": {"cron_expression": "cronExpression"},
@@ -793,6 +795,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
793795
"manual": {},
794796
"pull_request": {
795797
"events": ["PULL_REQUEST_EVENT_UNSPECIFIED"],
798+
"integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
796799
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
797800
},
798801
"time": {"cron_expression": "cronExpression"},
@@ -936,6 +939,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
936939
"manual": {},
937940
"pull_request": {
938941
"events": ["PULL_REQUEST_EVENT_UNSPECIFIED"],
942+
"integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
939943
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
940944
},
941945
"time": {"cron_expression": "cronExpression"},

0 commit comments

Comments
 (0)