Skip to content

159: enhancement: Use typed response structs instead of raw serde_json::Value#184

Merged
erishforG merged 2 commits intodevelopfrom
feature/159
Apr 20, 2026
Merged

159: enhancement: Use typed response structs instead of raw serde_json::Value#184
erishforG merged 2 commits intodevelopfrom
feature/159

Conversation

@erishforG
Copy link
Copy Markdown
Owner

enhancement: Use typed response structs instead of raw serde_json::Value

Ticket: 159

Shipped via parsec ship 159

erishforG and others added 2 commits April 20, 2026 14:41
Replace 10 standalone functions with methods on GitHubClient which
encapsulates remote parsing, token resolution, HTTP client creation,
and standard header injection. Callers now construct a client once
and reuse it for multiple API calls.

Closes #152

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce private Deserialize structs (ApiPr, ApiCombinedStatus, ApiReview,
ApiCheckRunsResponse, ApiMergeResponse, ApiCreateResponse, ApiPrListItem)
to replace all serde_json::Value usage in GitHubClient method bodies.

This eliminates fragile string-keyed indexing (e.g. resp["title"].as_str())
in favor of compile-time checked struct field access, improving type safety
and making API contract changes caught at compile time.

Closes #159

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erishforG erishforG merged commit c1f6349 into develop Apr 20, 2026
8 checks passed
@erishforG erishforG deleted the feature/159 branch April 20, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant