softprops / hubcaps

a rust interface for github
http://docs.rs/hubcaps
MIT License
279 stars 68 forks source link

Pull requests: missing field `merged` #297

Open piegamesde opened 3 years ago

piegamesde commented 3 years ago

🐛 Bug description

I'd like to list some pull request on a repository but it fails with the following error: "missing field merged at line 1 column 16964"

👟 Steps to reproduce

The following code fails for me with the error above:

    let github = Github::new(
        concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")),
        None,
    )?;
    let pulls = github.repo("NixOS", "nixpkgs")
        .pulls()
        .list(&Default::default())
        .await?;

🌍 Your environment

hubcaps version: a9e6616ecc7b8eef0ea0eaf6055d9610c8961500

piegamesde commented 3 years ago

I managed to get this to work by removing the line pub merged: bool, in Pull. Therefore wrapping that value in an Option seems to be necessary.