fix: remove debug prints
feat: include local branch in tracking
This commit is contained in:
parent
1e3cba55bf
commit
e033b3e678
|
@ -94,7 +94,6 @@ fn parse_pr(pr: &str) -> Result<u32> {
|
|||
}
|
||||
|
||||
async fn get_pr(pr: u32, client: &Client) -> Result<PR> {
|
||||
eprintln!("https://api.github.com/repos/nixos/nixpkgs/pulls/{}", pr);
|
||||
let request = client
|
||||
.get(format!(
|
||||
"https://api.github.com/repos/nixos/nixpkgs/pulls/{}",
|
||||
|
@ -108,10 +107,6 @@ async fn get_pr(pr: u32, client: &Client) -> Result<PR> {
|
|||
|
||||
async fn contains(branch: &str, pr: &PR, client: &Client) -> Result<bool> {
|
||||
if let Some(sha) = &pr.merge_commit_sha {
|
||||
eprintln!(
|
||||
"https://api.github.com/repos/nixos/nixpkgs/compare/{}...{}",
|
||||
branch, sha
|
||||
);
|
||||
let req = client
|
||||
.get(format!(
|
||||
"https://api.github.com/repos/nixos/nixpkgs/compare/{}...{}",
|
||||
|
@ -173,6 +168,8 @@ async fn main() -> Result<()> {
|
|||
let pr = parse_pr(&opts.pr)?;
|
||||
let pr = get_pr(pr, &client).await?;
|
||||
println!("{}", pr.title);
|
||||
let nix_rev = get_local_nixp_rev()?;
|
||||
println!("Local nixpkgs: {}", contains(&nix_rev, &pr, &client).await?);
|
||||
for &i in BRANCHES {
|
||||
println!("{}: {}", i, contains(i, &pr, &client).await?);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue