Skip to content

Commit

Permalink
Fix glacier command
Browse files Browse the repository at this point in the history
It was fetching the HTML rather than the raw source;
see rust-lang/glacier#530 for an example.
  • Loading branch information
camelid committed Oct 30, 2020
1 parent 880d095 commit d172b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handlers/glacier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ pub(super) async fn handle_command(
return Ok(());
};

let response = ctx.github.raw().get(&cmd.source).send().await?;
let html_url = cmd.source;
let url = html_url.replace("github.com", "githubusercontent.com") + "/raw/playground.rs";
let response = ctx.github.raw().get(&url).send().await?;
let body = response.text().await?;

let number = event.issue().unwrap().number;
Expand Down

0 comments on commit d172b87

Please sign in to comment.