Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 openapi/SPEC_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
05b8317c466daafb9fa4e7be2a6aad0909dda7a4
f04802661e353fbf4eaf082679e4df2d04939033
12 changes: 12 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3191,6 +3191,7 @@ components:
mergeStatus,
behind,
headSha,
kind,
baseBranch,
headBranch,
crossRepository,
Expand Down Expand Up @@ -3254,6 +3255,17 @@ components:
rebase moves it, which shows the bot acted even when the pull
request is still reported behind, or wasn't behind to begin
with. Empty when the forge didn't say. Always present.
kind:
type: string
enum: [release, dependency, regular]
description: |
What sort of pull request this is, decided by the server so no
client keeps its own copy of the rule. `release`: release-please's,
by its `autorelease:` label (a person opens these, so the label is
the only signal, and it wins over any bot author). `dependency`:
opened by Dependabot or Renovate, in either spelling of the login
(the bare slug GraphQL gives, or REST's `[bot]` form), on either
forge. `regular`: everything else. Always present.
baseBranch:
type: string
description: |
Expand Down
2 changes: 2 additions & 0 deletions src/forge_dashboard/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from .pull_request_checks_response import PullRequestChecksResponse
from .pull_request_dependabot_action_request import PullRequestDependabotActionRequest
from .pull_request_dependabot_action_request_action import PullRequestDependabotActionRequestAction
from .pull_request_kind import PullRequestKind
from .rate_limit import RateLimit
from .rate_limit_severity import RateLimitSeverity
from .receive_forgejo_webhook_body import ReceiveForgejoWebhookBody
Expand Down Expand Up @@ -106,6 +107,7 @@
"PullRequestChecksResponse",
"PullRequestDependabotActionRequest",
"PullRequestDependabotActionRequestAction",
"PullRequestKind",
"RateLimit",
"RateLimitSeverity",
"ReceiveForgejoWebhookBody",
Expand Down
18 changes: 18 additions & 0 deletions src/forge_dashboard/_generated/models/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ..models.ci_status import CIStatus
from ..models.forge import Forge
from ..models.merge_status import MergeStatus
from ..models.pull_request_kind import PullRequestKind
from ..types import UNSET, Unset
from typing import cast
import datetime
Expand Down Expand Up @@ -70,6 +71,13 @@ class PullRequest:
rebase moves it, which shows the bot acted even when the pull
request is still reported behind, or wasn't behind to begin
with. Empty when the forge didn't say. Always present.
kind (PullRequestKind): What sort of pull request this is, decided by the server so no
client keeps its own copy of the rule. `release`: release-please's,
by its `autorelease:` label (a person opens these, so the label is
the only signal, and it wins over any bot author). `dependency`:
opened by Dependabot or Renovate, in either spelling of the login
(the bare slug GraphQL gives, or REST's `[bot]` form), on either
forge. `regular`: everything else. Always present.
base_branch (str): The branch the pull request targets. Empty when the forge didn't
say.
head_branch (str): The branch the pull request comes from. Empty when the forge
Expand Down Expand Up @@ -175,6 +183,7 @@ class PullRequest:
merge_status: MergeStatus
behind: bool
head_sha: str
kind: PullRequestKind
base_branch: str
head_branch: str
cross_repository: bool
Expand Down Expand Up @@ -239,6 +248,8 @@ def to_dict(self) -> dict[str, Any]:

head_sha = self.head_sha

kind = self.kind.value

base_branch = self.base_branch

head_branch = self.head_branch
Expand Down Expand Up @@ -322,6 +333,7 @@ def to_dict(self) -> dict[str, Any]:
"mergeStatus": merge_status,
"behind": behind,
"headSha": head_sha,
"kind": kind,
"baseBranch": base_branch,
"headBranch": head_branch,
"crossRepository": cross_repository,
Expand Down Expand Up @@ -411,6 +423,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

head_sha = d.pop("headSha")

kind = PullRequestKind(d.pop("kind"))




base_branch = d.pop("baseBranch")

head_branch = d.pop("headBranch")
Expand Down Expand Up @@ -546,6 +563,7 @@ def _parse_update_request(data: object) -> None | Unset | UpdateRequest:
merge_status=merge_status,
behind=behind,
head_sha=head_sha,
kind=kind,
base_branch=base_branch,
head_branch=head_branch,
cross_repository=cross_repository,
Expand Down
9 changes: 9 additions & 0 deletions src/forge_dashboard/_generated/models/pull_request_kind.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from enum import StrEnum

class PullRequestKind(StrEnum):
DEPENDENCY = "dependency"
REGULAR = "regular"
RELEASE = "release"

def __str__(self) -> str:
return str(self.value)
Loading