Skip to content

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

@erishforG

Description

@erishforG

Problem

github/mod.rs indexes into serde_json::Value with patterns like pr_resp["head"]["sha"].as_str().unwrap_or(""). If the API returns an error JSON, this silently produces empty strings.

Proposed Solution

Define #[derive(Deserialize)] structs for PR, CheckRun, Issue responses. Errors surface at deserialization time with clear messages. Use #[serde(default)] for optional fields.

Category: enhancement | Priority: medium

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions