ghzinga 0.4.0

Terminal UI for monitoring GitHub pull requests and issues.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{fs, path::Path};

use anyhow::Context;

use crate::domain::Resource;

pub mod api;
mod auth;
mod public_rest;
mod queries;
mod transport;

pub fn load_fixture(path: &Path) -> anyhow::Result<Resource> {
    let raw = fs::read_to_string(path)
        .with_context(|| format!("failed to read fixture {}", path.display()))?;
    serde_json::from_str(&raw)
        .with_context(|| format!("failed to parse fixture {}", path.display()))
}