Modernize github implementation and use Pydantic for parsing.
Review Request #15122 — Created June 12, 2026 and submitted
This change updates our github client implementation to use Pydantic for
parsing API payloads, and fixes up type hints and docstrings throughout.While working in the paginated resources, I realized that the
start
andper_pageparameters weren't getting plumbed through at all, so
I've fixed that as well.
Ran unit tests.
| Summary | ID |
|---|---|
| myylkmlorkqwkztrmunzoxxvoszokpqp |
| Description | From | Last Updated |
|---|---|---|
|
closing bracket does not match indentation of opening bracket's line Column: 9 Error code: E123 |
|
|
|
Can we use Sequence instead of list here and for rhe rest of the list-type attributes? |
|
|
|
Old typo not caught by your other change: "with" -> "will". |
|
|
|
This is missing an Args and Returns section. |
|
|
|
Same typo here as mentioned above. |
|
|
|
'reviewboard.scmtools.core.Commit' imported but unused Column: 1 Error code: F401 |
|
|
|
continuation line over-indented for hanging indent Column: 17 Error code: E126 |
|
|
|
This should say TreeResponse. |
|
- Commits:
-
Summary ID myylkmlorkqwkztrmunzoxxvoszokpqp myylkmlorkqwkztrmunzoxxvoszokpqp - Diff:
-
Revision 2 (+2852 -1048)
Checks run (2 succeeded)
- Change Summary:
-
Changed my mind on the approach. Instead of the client basically implementing the
BaseHostingServiceAPI directly, it now is a thin(ish) layer that makes requests to specific API endpoints and returns either the pydantic model (for individual items) or a paginator (for lists). Logic for composing API calls and converting the pydantic models into the hostingsvcs/scmtools return values has been moved back into the hosting service class.I've also added the
default_branchimplementation that was previously a TODO comment. - Commits:
-
Summary ID myylkmlorkqwkztrmunzoxxvoszokpqp myylkmlorkqwkztrmunzoxxvoszokpqp - Diff:
-
Revision 3 (+3296 -1136)
- Commits:
-
Summary ID myylkmlorkqwkztrmunzoxxvoszokpqp myylkmlorkqwkztrmunzoxxvoszokpqp - Diff:
-
Revision 4 (+3294 -1136)