Skip to content

Commit 2e93762

Browse files
Fixes glacier command (#580)
* Fixes glacier command
2 parents 27784ba + 1a5884a commit 2e93762

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

parser/src/command/glacier.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
//! The glacier command parser.
22
//!
3-
//! This adds the option to track ICEs. Do note that the gist must be from a playground link.
4-
//! The link must also be in quotes.
3+
//! This adds the option to track ICEs. The <code-source> must be in quotes.
54
//!
65
//! The grammar is as follows:
76
//!
87
//! ```text
98
//! Command: `@bot glacier <code-source>`
109
//!
11-
//! <code-source>:
12-
//! - "https://gist.github.com/.*"
10+
//! <code-source>: any URL that resolves to plain-text Rust code
1311
//! ```
1412
1513
use crate::error::Error;

src/handlers/glacier.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ async fn handle_input(ctx: &Context, event: &Event, cmd: GlacierCommand) -> anyh
6363
return Ok(())
6464
};
6565

66-
let url = cmd.source;
67-
let response = ctx.github.raw().get(&format!("{}{}", url.replace("github", "githubusercontent"), "/playground.rs")).send().await?;
66+
let response = ctx.github.raw().get(&cmd.source).send().await?;
6867
let body = response.text().await?;
6968

7069
let number = event.issue().unwrap().number;

0 commit comments

Comments
 (0)