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
116 changes: 116 additions & 0 deletions openapi.public.json
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,17 @@
}
],
"description": "The git hook that asked for this patch review: `HOOK_PRE_COMMIT` or\n `HOOK_PRE_PUSH`. Null for any other review, and for a patch review\n requested without naming a hook."
},
"walkthrough": {
"anyOf": [
{
"$ref": "#/components/schemas/WalkthroughView"
},
{
"type": "null"
}
],
"description": "The reviewed head's changed files in reading groups, with a line per\n file. Absent until the walkthrough is stored, and for a review that\n has none."
}
},
"required": [
Expand Down Expand Up @@ -6201,6 +6212,111 @@
"untrusted_text"
],
"type": "object"
},
"WalkthroughFileView": {
"properties": {
"additions": {
"format": "int64",
"type": "integer"
},
"change": {
"description": "GitHub's change status, upper case, such as `ADDED` or `RENAMED`.",
"type": "string"
},
"deletions": {
"format": "int64",
"type": "integer"
},
"depth": {
"description": "The route plan's depth tier. Absent for a file the review did not\n evaluate.",
"type": [
"string",
"null"
]
},
"generated": {
"description": "Whether `line` is model-authored.",
"type": "boolean"
},
"line": {
"description": "A model sentence, or the deterministic line when there is none.",
"type": "string"
},
"path": {
"type": "string"
},
"previous_path": {
"type": [
"string",
"null"
]
},
"skip_class": {
"description": "Why the review did not evaluate the file, such as `LOCKFILE` or\n `REPOSITORY_FILTER`.",
"type": [
"string",
"null"
]
}
},
"required": [
"path",
"change",
"additions",
"deletions",
"line",
"generated"
],
"type": "object"
},
"WalkthroughGroupView": {
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"files": {
"items": {
"$ref": "#/components/schemas/WalkthroughFileView"
},
"type": "array"
},
"kind": {
"description": "`FEATURE`, `FIX`, `REFACTOR`, `CONFIGURATION`, `INFRASTRUCTURE`,\n `DATA`, `DEPENDENCIES`, `TESTS` or `DOCS`.",
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"title",
"kind",
"files"
],
"type": "object"
},
"WalkthroughView": {
"description": "One review's walkthrough of its pinned head. Titles and lines are model\n text over untrusted repository content: render them as text.",
"properties": {
"groups": {
"description": "Groups in reading order.",
"items": {
"$ref": "#/components/schemas/WalkthroughGroupView"
},
"type": "array"
},
"head_sha": {
"type": "string"
}
},
"required": [
"head_sha",
"groups"
],
"type": "object"
}
},
"securitySchemes": {
Expand Down
6 changes: 6 additions & 0 deletions proofline/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
from .thread_provider_state import ThreadProviderState
from .thread_reply_evidence import ThreadReplyEvidence
from .untrusted_text import UntrustedText
from .walkthrough_file_view import WalkthroughFileView
from .walkthrough_group_view import WalkthroughGroupView
from .walkthrough_view import WalkthroughView

__all__ = (
"ActionUnavailability",
Expand Down Expand Up @@ -342,4 +345,7 @@
"ThreadProviderState",
"ThreadReplyEvidence",
"UntrustedText",
"WalkthroughFileView",
"WalkthroughGroupView",
"WalkthroughView",
)
36 changes: 36 additions & 0 deletions proofline/_generated/models/customer_review_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from ..models.review_diff_stats import ReviewDiffStats
from ..models.review_open_items import ReviewOpenItems
from ..models.subject_view import SubjectView
from ..models.walkthrough_view import WalkthroughView


T = TypeVar("T", bound="CustomerReviewDetail")
Expand Down Expand Up @@ -174,6 +175,10 @@ class CustomerReviewDetail:
`HOOK_PRE_COMMIT` or
`HOOK_PRE_PUSH`. Null for any other review, and for a patch review
requested without naming a hook.
walkthrough (None | Unset | WalkthroughView): The reviewed head's changed files in reading groups, with a line
per
file. Absent until the walkthrough is stored, and for a review that
has none.
"""

actions: ReviewActions
Expand Down Expand Up @@ -235,6 +240,7 @@ class CustomerReviewDetail:
stopped_from: None | str | Unset = UNSET
superseded_by_review_id: None | Unset | UUID = UNSET
trigger_source: None | PatchTriggerSource | Unset = UNSET
walkthrough: None | Unset | WalkthroughView = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand All @@ -248,6 +254,7 @@ def to_dict(self) -> dict[str, Any]:
from ..models.refresh_view import RefreshView # noqa: PLC0415
from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415
from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415
from ..models.walkthrough_view import WalkthroughView # noqa: PLC0415

actions = self.actions.to_dict()

Expand Down Expand Up @@ -583,6 +590,14 @@ def to_dict(self) -> dict[str, Any]:
else:
trigger_source = self.trigger_source

walkthrough: dict[str, Any] | None | Unset
if isinstance(self.walkthrough, Unset):
walkthrough = UNSET
elif isinstance(self.walkthrough, WalkthroughView):
walkthrough = self.walkthrough.to_dict()
else:
walkthrough = self.walkthrough

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
Expand Down Expand Up @@ -692,6 +707,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["superseded_by_review_id"] = superseded_by_review_id
if trigger_source is not UNSET:
field_dict["trigger_source"] = trigger_source
if walkthrough is not UNSET:
field_dict["walkthrough"] = walkthrough

return field_dict

Expand All @@ -712,6 +729,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415
from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415
from ..models.subject_view import SubjectView # noqa: PLC0415
from ..models.walkthrough_view import WalkthroughView # noqa: PLC0415

d = dict(src_dict)
actions = ReviewActions.from_dict(d.pop("actions"))
Expand Down Expand Up @@ -1304,6 +1322,23 @@ def _parse_trigger_source(data: object) -> None | PatchTriggerSource | Unset:

trigger_source = _parse_trigger_source(d.pop("trigger_source", UNSET))

def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, dict):
raise TypeError()
walkthrough_type_0 = WalkthroughView.from_dict(data)

return walkthrough_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
return cast(None | Unset | WalkthroughView, data)

walkthrough = _parse_walkthrough(d.pop("walkthrough", UNSET))

customer_review_detail = cls(
actions=actions,
assessment_count=assessment_count,
Expand Down Expand Up @@ -1364,6 +1399,7 @@ def _parse_trigger_source(data: object) -> None | PatchTriggerSource | Unset:
stopped_from=stopped_from,
superseded_by_review_id=superseded_by_review_id,
trigger_source=trigger_source,
walkthrough=walkthrough,
)

customer_review_detail.additional_properties = d
Expand Down
Loading
Loading