Crates.io | goodbrother |
lib.rs | goodbrother |
version | 1.1.0 |
source | src |
created_at | 2022-01-02 13:54:40.680946 |
updated_at | 2022-11-05 15:18:33.54639 |
description | List open PRs in Github by user |
homepage | |
repository | https://github.com/stscoundrel/goodbrother-rs |
max_upload_size | |
id | 506549 |
size | 21,931 |
List open PRs in Github by user. Rust port of original TypeScript library.
If you have many repos that receive regular updades with Dependabot, you're simply likely to miss some of them. I occasionally only found PRs when I get notification that they were closed in favor of a even newer version.
Goodbrother is there to let me know if I still have some open.
cargo add goodbrother
Or add this to your Cargo.toml
:
[dependencies]
goodbrother = "1.1.0"
Listing all pull requests:
use goodbrother::{get_pull_requests_by_user, PullRequest};
// Fetch list of open PRs by user.
let username = "stscoundrel";
// Returns Result, which may be error due to Github API connections.
let result = get_pull_requests_by_user(username).unwrap();
// Result is a vector of PullRequest structs. Eg:
// {
// id: 1068208284,
// name: Bump eslint-config-airbnb-base from 14.2.1 to 15.0.0,
// link: https://github.com/stscoundrel/gatsby-source-plugin-zoega/pull/18,
// is_dependabot: true,
// repository: stscoundrel/gatsby-source-plugin-zoega,
// }
Listing pull requests grouped by repos:
use goodbrother::{get_grouped_pull_requests_by_user, Repository};
// Fetch list of open PRs by user.
let username = "stscoundrel";
// Returns Result, which may be error due to Github API connections.
let result = get_grouped_pull_requests_by_user(username).unwrap();
// Result is a vector of Repository structs. Eg:
// {
// name: goodbrother
// pull_requests: PullRequest[],
// }