From d5f7376c22576b96906ad23bc4c18af8b8f4724e Mon Sep 17 00:00:00 2001 From: alrayyes <511318+alrayyes@users.noreply.github.com> Date: Mon, 5 Oct 2026 21:45:16 +0000 Subject: [PATCH] fix: regenerate client from updated forge-dashboard spec --- openapi/SPEC_COMMIT | 2 +- openapi/openapi.yaml | 12 ++++++++++++ .../_generated/models/__init__.py | 2 ++ .../_generated/models/pull_request.py | 18 ++++++++++++++++++ .../_generated/models/pull_request_kind.py | 9 +++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/forge_dashboard/_generated/models/pull_request_kind.py diff --git a/openapi/SPEC_COMMIT b/openapi/SPEC_COMMIT index adcd5bf..737f3b5 100644 --- a/openapi/SPEC_COMMIT +++ b/openapi/SPEC_COMMIT @@ -1 +1 @@ -05b8317c466daafb9fa4e7be2a6aad0909dda7a4 +f04802661e353fbf4eaf082679e4df2d04939033 diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 17110fa..c2d6ec5 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -3191,6 +3191,7 @@ components: mergeStatus, behind, headSha, + kind, baseBranch, headBranch, crossRepository, @@ -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: | diff --git a/src/forge_dashboard/_generated/models/__init__.py b/src/forge_dashboard/_generated/models/__init__.py index 67567f4..8b4fc4f 100644 --- a/src/forge_dashboard/_generated/models/__init__.py +++ b/src/forge_dashboard/_generated/models/__init__.py @@ -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 @@ -106,6 +107,7 @@ "PullRequestChecksResponse", "PullRequestDependabotActionRequest", "PullRequestDependabotActionRequestAction", + "PullRequestKind", "RateLimit", "RateLimitSeverity", "ReceiveForgejoWebhookBody", diff --git a/src/forge_dashboard/_generated/models/pull_request.py b/src/forge_dashboard/_generated/models/pull_request.py index ce43689..6d9bc53 100644 --- a/src/forge_dashboard/_generated/models/pull_request.py +++ b/src/forge_dashboard/_generated/models/pull_request.py @@ -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 @@ -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 @@ -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 @@ -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 @@ -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, @@ -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") @@ -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, diff --git a/src/forge_dashboard/_generated/models/pull_request_kind.py b/src/forge_dashboard/_generated/models/pull_request_kind.py new file mode 100644 index 0000000..cdc526c --- /dev/null +++ b/src/forge_dashboard/_generated/models/pull_request_kind.py @@ -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)