Skip to content

Commit

Permalink
feat!: inform of rev. ref. to fetch instead of queried rev. info
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Nov 13, 2023
1 parent ee8742d commit 04a972f
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,21 @@ async fn get_artifacts_for_revision(client: &Client, options: &Options, revision
hash: revision,
} = revision;

log::info!("fetching for revision(s): {:?}", [&revision]);

let Revision {
meta: RevisionMeta { count },
mut results,
} = {
let revision = client
.get(format!(
"{treeherder_host}api/project/{project_name}/push/?revision={revision}"
))
.send()
.await
.unwrap()
.json::<Revision>()
.await
.unwrap();
log::info!("fetching for revision(s): {:?}", [&revision]);
revision
};
} = client
.get(format!(
"{treeherder_host}api/project/{project_name}/push/?revision={revision}"
))
.send()
.await
.unwrap()
.json::<Revision>()
.await
.unwrap();

assert!(results.len() == usize::try_from(count).unwrap());
if count > 1 {
Expand Down

0 comments on commit 04a972f

Please sign in to comment.