Skip to content

Commit e0023da

Browse files
feat(api): add draft and state fields to PullRequest proto
1 parent a55115b commit e0023da

File tree

11 files changed

+48
-3
lines changed

11 files changed

+48
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 160
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cad9422301ea573f7fdbcf5047e421a0a6e963468a9d8f464e47ed1800a8fc75.yml
3-
openapi_spec_hash: b2e5072d4659a5c4fb5d2e8916388af9
4-
config_hash: d3267594264bfb76d2ee7e881d5f8a5a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-47577991d03c0dab9d0f219bd3f6cf8cb3ea386a919a10c949318091aca5b10f.yml
3+
openapi_spec_hash: ad236fd154210c60d9aca150a3fd51bc
4+
config_hash: f36d04c8359fe8baec226396a18b309e

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ from gitpod.types import (
1515
ResourceType,
1616
RunsOn,
1717
SecretRef,
18+
State,
1819
Subject,
1920
Task,
2021
TaskExecution,

src/gitpod/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .secret import Secret as Secret
1111
from .shared import (
1212
Task as Task,
13+
State as State,
1314
RunsOn as RunsOn,
1415
Gateway as Gateway,
1516
Subject as Subject,

src/gitpod/types/agent_code_context.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pydantic import Field as FieldInfo
66

77
from .._models import BaseModel
8+
from .shared.state import State
89

910
__all__ = ["AgentCodeContext", "ContextURL", "PullRequest", "PullRequestRepository"]
1011

@@ -40,12 +41,18 @@ class PullRequest(BaseModel):
4041
author: Optional[str] = None
4142
"""Author name as provided by the SCM system"""
4243

44+
draft: Optional[bool] = None
45+
"""Whether this is a draft pull request"""
46+
4347
from_branch: Optional[str] = FieldInfo(alias="fromBranch", default=None)
4448
"""Source branch name (the branch being merged from)"""
4549

4650
repository: Optional[PullRequestRepository] = None
4751
"""Repository information"""
4852

53+
state: Optional[State] = None
54+
"""Current state of the pull request"""
55+
4956
title: Optional[str] = None
5057
"""Pull request title"""
5158

src/gitpod/types/agent_code_context_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing_extensions import Annotated, TypedDict
77

88
from .._utils import PropertyInfo
9+
from .shared.state import State
910

1011
__all__ = ["AgentCodeContextParam", "ContextURL", "PullRequest", "PullRequestRepository"]
1112

@@ -41,12 +42,18 @@ class PullRequest(TypedDict, total=False):
4142
author: str
4243
"""Author name as provided by the SCM system"""
4344

45+
draft: bool
46+
"""Whether this is a draft pull request"""
47+
4448
from_branch: Annotated[str, PropertyInfo(alias="fromBranch")]
4549
"""Source branch name (the branch being merged from)"""
4650

4751
repository: PullRequestRepository
4852
"""Repository information"""
4953

54+
state: State
55+
"""Current state of the pull request"""
56+
5057
title: str
5158
"""Pull request title"""
5259

src/gitpod/types/runner_parse_context_url_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pydantic import Field as FieldInfo
66

77
from .._models import BaseModel
8+
from .shared.state import State
89

910
__all__ = ["RunnerParseContextURLResponse", "Git", "Issue", "Pr", "PullRequest", "PullRequestRepository"]
1011

@@ -71,12 +72,18 @@ class PullRequest(BaseModel):
7172
author: Optional[str] = None
7273
"""Author name as provided by the SCM system"""
7374

75+
draft: Optional[bool] = None
76+
"""Whether this is a draft pull request"""
77+
7478
from_branch: Optional[str] = FieldInfo(alias="fromBranch", default=None)
7579
"""Source branch name (the branch being merged from)"""
7680

7781
repository: Optional[PullRequestRepository] = None
7882
"""Repository information"""
7983

84+
state: Optional[State] = None
85+
"""Current state of the pull request"""
86+
8087
title: Optional[str] = None
8188
"""Pull request title"""
8289

src/gitpod/types/shared/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from .task import Task as Task
4+
from .state import State as State
45
from .gateway import Gateway as Gateway
56
from .runs_on import RunsOn as RunsOn
67
from .subject import Subject as Subject

src/gitpod/types/shared/state.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal, TypeAlias
4+
5+
__all__ = ["State"]
6+
7+
State: TypeAlias = Literal["STATE_UNSPECIFIED", "STATE_OPEN", "STATE_CLOSED", "STATE_MERGED"]

src/gitpod/types/shared_params/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .state import State as State
34
from .runs_on import RunsOn as RunsOn
45
from .subject import Subject as Subject
56
from .principal import Principal as Principal
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypeAlias
6+
7+
__all__ = ["State"]
8+
9+
State: TypeAlias = Literal["STATE_UNSPECIFIED", "STATE_OPEN", "STATE_CLOSED", "STATE_MERGED"]

0 commit comments

Comments
 (0)