Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d3b837f
codegen metadata
stainless-app[bot] Apr 3, 2026
da8b4a6
codegen metadata
stainless-app[bot] Apr 3, 2026
3e12437
codegen metadata
stainless-app[bot] Apr 6, 2026
b7f0b1d
fix(client): preserve hardcoded query params when merging with user p…
stainless-app[bot] Apr 7, 2026
9bbf633
codegen metadata
stainless-app[bot] Apr 7, 2026
897c665
codegen metadata
stainless-app[bot] Apr 8, 2026
308ce72
codegen metadata
stainless-app[bot] Apr 8, 2026
faca2b2
feat(api): remove terminal field from RunsOn type
stainless-app[bot] Apr 8, 2026
368d727
codegen metadata
stainless-app[bot] Apr 9, 2026
23bc7c3
codegen metadata
stainless-app[bot] Apr 9, 2026
4a1affd
codegen metadata
stainless-app[bot] Apr 9, 2026
eeedd00
codegen metadata
stainless-app[bot] Apr 10, 2026
db5b24c
codegen metadata
stainless-app[bot] Apr 10, 2026
d79d4d4
feat(api): add old_path field to ContentGitChangedFile
stainless-app[bot] Apr 10, 2026
5c02854
fix: ensure file data are only sent as 1 parameter
stainless-app[bot] Apr 10, 2026
5a292cb
docs(api): update trigger usage note in AutomationTrigger
stainless-app[bot] Apr 10, 2026
af2c44e
feat(api): add prebuild trigger value to environments automations
stainless-app[bot] Apr 13, 2026
201d9c6
codegen metadata
stainless-app[bot] Apr 13, 2026
ad622d8
codegen metadata
stainless-app[bot] Apr 14, 2026
077b662
feat(api): add integration_id field, make webhook_id required in pull…
stainless-app[bot] Apr 14, 2026
59fa709
codegen metadata
stainless-app[bot] Apr 15, 2026
c7f5238
codegen metadata
stainless-app[bot] Apr 15, 2026
e77b613
codegen metadata
stainless-app[bot] Apr 15, 2026
c29b095
feat(api): add port_authentication capability to runner_capability
stainless-app[bot] Apr 16, 2026
0352b9b
codegen metadata
stainless-app[bot] Apr 16, 2026
72091d6
codegen metadata
stainless-app[bot] Apr 16, 2026
443b04e
codegen metadata
stainless-app[bot] Apr 16, 2026
242a3ab
feat(api): add PULL_REQUEST_EVENT_REVIEW_REQUESTED to workflow_trigge…
stainless-app[bot] Apr 17, 2026
74af533
feat(api): add SUPPORTED_MODEL_OPUS_4_7 to agent_execution Status
stainless-app[bot] Apr 17, 2026
cb792b6
perf(client): optimize file structure copying in multipart requests
stainless-app[bot] Apr 17, 2026
ea300f4
feat(api): add UserInputMetadata type
stainless-app[bot] Apr 21, 2026
5c7fa85
codegen metadata
stainless-app[bot] Apr 21, 2026
7eb2fad
codegen metadata
stainless-app[bot] Apr 21, 2026
54503f5
feat(api): add SUPPORTED_MODEL_OPENAI_AUTO to agent_execution status
stainless-app[bot] Apr 22, 2026
5f05caa
chore(internal): more robust bootstrap script
stainless-app[bot] Apr 22, 2026
846c6f8
codegen metadata
stainless-app[bot] Apr 22, 2026
d0d62cf
codegen metadata
stainless-app[bot] Apr 23, 2026
5e7b9f3
docs(types): mark is_admin deprecated in Organization model
stainless-app[bot] Apr 23, 2026
14ad30a
codegen metadata
stainless-app[bot] Apr 23, 2026
9236eb4
codegen metadata
stainless-app[bot] Apr 23, 2026
c318e03
codegen metadata
stainless-app[bot] Apr 24, 2026
333311a
feat(api): add pagination and query parameter to runners.list_scm_org…
stainless-app[bot] Apr 24, 2026
8d2d67e
codegen metadata
stainless-app[bot] Apr 24, 2026
e2b45a6
codegen metadata
stainless-app[bot] Apr 24, 2026
e62853d
release: 0.12.0
stainless-app[bot] Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.0"
".": "0.12.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 193
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3dcdbd68ce4b336149d28d17ab08f211538ed6630112ae4883af2f6680643159.yml
openapi_spec_hash: 7e4333995b65cf32663166801e2444bb
config_hash: 8d7b241284195a8c51f5d670fbbe0ab4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c5b3669c8db150b04d14f02596f3fd59076b7ac971fbb66583231a1189a8c91b.yml
openapi_spec_hash: a4114b38d47f0696fdf23bfe64dc446c
config_hash: 4447d1e1149a80d1bec70d353fb8acbf
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 0.12.0 (2026-04-24)

Full Changelog: [v0.11.0...v0.12.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.11.0...v0.12.0)

### Features

* **api:** add integration_id field, make webhook_id required in pull_request trigger ([077b662](https://github.com/gitpod-io/gitpod-sdk-python/commit/077b6622dc4e21a2033c8275c46716286a6515b8))
* **api:** add old_path field to ContentGitChangedFile ([d79d4d4](https://github.com/gitpod-io/gitpod-sdk-python/commit/d79d4d49ef41a889a81a0d484616fca442849356))
* **api:** add pagination and query parameter to runners.list_scm_organizations ([333311a](https://github.com/gitpod-io/gitpod-sdk-python/commit/333311aebaefb657861e2a9f6e8adb0f2abdd4dc))
* **api:** add port_authentication capability to runner_capability ([c29b095](https://github.com/gitpod-io/gitpod-sdk-python/commit/c29b09596d2d87caaea047e61613a333c2fe4e31))
* **api:** add prebuild trigger value to environments automations ([af2c44e](https://github.com/gitpod-io/gitpod-sdk-python/commit/af2c44e64fac19bf848c4325e0b39b183c998e74))
* **api:** add PULL_REQUEST_EVENT_REVIEW_REQUESTED to workflow_trigger events ([242a3ab](https://github.com/gitpod-io/gitpod-sdk-python/commit/242a3ab60ed3580fd9488858727294ed86568ccf))
* **api:** add SUPPORTED_MODEL_OPENAI_AUTO to agent_execution status ([54503f5](https://github.com/gitpod-io/gitpod-sdk-python/commit/54503f5295a703ee855eac4c11694d2bbe465d13))
* **api:** add SUPPORTED_MODEL_OPUS_4_7 to agent_execution Status ([74af533](https://github.com/gitpod-io/gitpod-sdk-python/commit/74af5338d7f6447df5a6464a2b2ef893c3bf4f6e))
* **api:** add UserInputMetadata type ([ea300f4](https://github.com/gitpod-io/gitpod-sdk-python/commit/ea300f4314c14529c02ffec1e38f474d8a426844))
* **api:** remove terminal field from RunsOn type ([faca2b2](https://github.com/gitpod-io/gitpod-sdk-python/commit/faca2b27b88f17a759bd91c305e5ea2a856a1e2c))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([b7f0b1d](https://github.com/gitpod-io/gitpod-sdk-python/commit/b7f0b1d27ef51872bf81541dd7f81a8101f856af))
* ensure file data are only sent as 1 parameter ([5c02854](https://github.com/gitpod-io/gitpod-sdk-python/commit/5c02854efdc2874535d3d7867823048d5e8d4693))


### Performance Improvements

* **client:** optimize file structure copying in multipart requests ([cb792b6](https://github.com/gitpod-io/gitpod-sdk-python/commit/cb792b633104ff26eb799d8c32703920213ec23e))


### Chores

* **internal:** more robust bootstrap script ([5f05caa](https://github.com/gitpod-io/gitpod-sdk-python/commit/5f05caacfd1a55617d435845771e28503eff687c))


### Documentation

* **api:** update trigger usage note in AutomationTrigger ([5a292cb](https://github.com/gitpod-io/gitpod-sdk-python/commit/5a292cb1ef87a0dd73d93445707412d25c0e95e0))
* **types:** mark is_admin deprecated in Organization model ([5e7b9f3](https://github.com/gitpod-io/gitpod-sdk-python/commit/5e7b9f3d7dd7af385ca75b17f01c1cab87da8cb6))

## 0.11.0 (2026-04-02)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.10.0...v0.11.0)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ from gitpod.types import (
Role,
Type,
UserInputBlock,
UserInputMetadata,
WakeEvent,
AgentCreateExecutionConversationTokenResponse,
AgentCreatePromptResponse,
Expand Down Expand Up @@ -709,7 +710,7 @@ Methods:
- <code title="post /gitpod.v1.RunnerService/CheckRepositoryAccess">client.runners.<a href="./src/gitpod/resources/runners/runners.py">check_repository_access</a>(\*\*<a href="src/gitpod/types/runner_check_repository_access_params.py">params</a>) -> <a href="./src/gitpod/types/runner_check_repository_access_response.py">RunnerCheckRepositoryAccessResponse</a></code>
- <code title="post /gitpod.v1.RunnerService/CreateRunnerLogsToken">client.runners.<a href="./src/gitpod/resources/runners/runners.py">create_logs_token</a>(\*\*<a href="src/gitpod/types/runner_create_logs_token_params.py">params</a>) -> <a href="./src/gitpod/types/runner_create_logs_token_response.py">RunnerCreateLogsTokenResponse</a></code>
- <code title="post /gitpod.v1.RunnerService/CreateRunnerToken">client.runners.<a href="./src/gitpod/resources/runners/runners.py">create_runner_token</a>(\*\*<a href="src/gitpod/types/runner_create_runner_token_params.py">params</a>) -> <a href="./src/gitpod/types/runner_create_runner_token_response.py">RunnerCreateRunnerTokenResponse</a></code>
- <code title="post /gitpod.v1.RunnerService/ListSCMOrganizations">client.runners.<a href="./src/gitpod/resources/runners/runners.py">list_scm_organizations</a>(\*\*<a href="src/gitpod/types/runner_list_scm_organizations_params.py">params</a>) -> <a href="./src/gitpod/types/runner_list_scm_organizations_response.py">RunnerListScmOrganizationsResponse</a></code>
- <code title="post /gitpod.v1.RunnerService/ListSCMOrganizations">client.runners.<a href="./src/gitpod/resources/runners/runners.py">list_scm_organizations</a>(\*\*<a href="src/gitpod/types/runner_list_scm_organizations_params.py">params</a>) -> <a href="./src/gitpod/types/runner_list_scm_organizations_response.py">SyncOrganizationsPage[RunnerListScmOrganizationsResponse]</a></code>
- <code title="post /gitpod.v1.RunnerService/ParseContextURL">client.runners.<a href="./src/gitpod/resources/runners/runners.py">parse_context_url</a>(\*\*<a href="src/gitpod/types/runner_parse_context_url_params.py">params</a>) -> <a href="./src/gitpod/types/runner_parse_context_url_response.py">RunnerParseContextURLResponse</a></code>
- <code title="post /gitpod.v1.RunnerService/SearchRepositories">client.runners.<a href="./src/gitpod/resources/runners/runners.py">search_repositories</a>(\*\*<a href="src/gitpod/types/runner_search_repositories_params.py">params</a>) -> <a href="./src/gitpod/types/runner_search_repositories_response.py">RunnerSearchRepositoriesResponse</a></code>

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gitpod-sdk"
version = "0.11.0"
version = "0.12.0"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
Expand Down
4 changes: 4 additions & 0 deletions src/gitpod/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
56 changes: 53 additions & 3 deletions src/gitpod/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io
import os
import pathlib
from typing import overload
from typing_extensions import TypeGuard
from typing import Sequence, cast, overload
from typing_extensions import TypeVar, TypeGuard

import anyio

Expand All @@ -17,7 +17,9 @@
HttpxFileContent,
HttpxRequestFiles,
)
from ._utils import is_tuple_t, is_mapping_t, is_sequence_t
from ._utils import is_list, is_mapping, is_tuple_t, is_mapping_t, is_sequence_t

_T = TypeVar("_T")


def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]:
Expand Down Expand Up @@ -121,3 +123,51 @@ async def async_read_file_content(file: FileContent) -> HttpxFileContent:
return await anyio.Path(file).read_bytes()

return file


def deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]]) -> _T:
"""Copy only the containers along the given paths.

Used to guard against mutation by extract_files without copying the entire structure.
Only dicts and lists that lie on a path are copied; everything else
is returned by reference.

For example, given paths=[["foo", "files", "file"]] and the structure:
{
"foo": {
"bar": {"baz": {}},
"files": {"file": <content>}
}
}
The root dict, "foo", and "files" are copied (they lie on the path).
"bar" and "baz" are returned by reference (off the path).
"""
return _deepcopy_with_paths(item, paths, 0)


def _deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]], index: int) -> _T:
if not paths:
return item
if is_mapping(item):
key_to_paths: dict[str, list[Sequence[str]]] = {}
for path in paths:
if index < len(path):
key_to_paths.setdefault(path[index], []).append(path)

# if no path continues through this mapping, it won't be mutated and copying it is redundant
if not key_to_paths:
return item

result = dict(item)
for key, subpaths in key_to_paths.items():
if key in result:
result[key] = _deepcopy_with_paths(result[key], subpaths, index + 1)
return cast(_T, result)
if is_list(item):
array_paths = [path for path in paths if index < len(path) and path[index] == "<array>"]

# if no path expects a list here, nothing will be mutated inside it - return by reference
if not array_paths:
return cast(_T, item)
return cast(_T, [_deepcopy_with_paths(entry, array_paths, index + 1) for entry in item])
return item
1 change: 0 additions & 1 deletion src/gitpod/_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
coerce_integer as coerce_integer,
file_from_path as file_from_path,
strip_not_given as strip_not_given,
deepcopy_minimal as deepcopy_minimal,
get_async_library as get_async_library,
maybe_coerce_float as maybe_coerce_float,
get_required_header as get_required_header,
Expand Down
20 changes: 3 additions & 17 deletions src/gitpod/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down Expand Up @@ -176,21 +177,6 @@ def is_iterable(obj: object) -> TypeGuard[Iterable[object]]:
return isinstance(obj, Iterable)


def deepcopy_minimal(item: _T) -> _T:
"""Minimal reimplementation of copy.deepcopy() that will only copy certain object types:

- mappings, e.g. `dict`
- list

This is done for performance reasons.
"""
if is_mapping(item):
return cast(_T, {k: deepcopy_minimal(v) for k, v in item.items()})
if is_list(item):
return cast(_T, [deepcopy_minimal(entry) for entry in item])
return item


# copied from https://github.com/Rapptz/RoboDanny
def human_join(seq: Sequence[str], *, delim: str = ", ", final: str = "or") -> str:
size = len(seq)
Expand Down
2 changes: 1 addition & 1 deletion src/gitpod/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gitpod"
__version__ = "0.11.0" # x-release-please-version
__version__ = "0.12.0" # x-release-please-version
53 changes: 53 additions & 0 deletions src/gitpod/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"MembersPagePagination",
"SyncMembersPage",
"AsyncMembersPage",
"OrganizationsPagePagination",
"SyncOrganizationsPage",
"AsyncOrganizationsPage",
"OutputsPagePagination",
"SyncOutputsPage",
"AsyncOutputsPage",
Expand Down Expand Up @@ -819,6 +822,56 @@ def next_page_info(self) -> Optional[PageInfo]:
return PageInfo(params={"token": next_token})


class OrganizationsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)


class SyncOrganizationsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
organizations: List[_T]
pagination: Optional[OrganizationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
organizations = self.organizations
if not organizations:
return []
return organizations

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class AsyncOrganizationsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
organizations: List[_T]
pagination: Optional[OrganizationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
organizations = self.organizations
if not organizations:
return []
return organizations

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class OutputsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)

Expand Down
Loading