Skip to content

Conversation

@Elinvynia
Copy link
Contributor

This updates octocrab to fix the issue mentioned in: rust-lang/glacier#231
Also, it fixes my mistake in parsing the URL. This also allows ANY gist to be used instead of just a playground link.


let url = cmd.source;
let response = ctx.github.raw().get(&format!("{}{}", url.replace("github", "githubusercontent"), "/playground.rs")).send().await?;
let response = ctx.github.raw().get(&format!("{}{}", url, "/raw")).send().await?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it makes sense to just directly send a request to the relevant URL? That would give more flexibility and be easier to understand I think-- just saying "please provide a URL resolving to plain-text rust code" makes a lot of sense I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I'll change it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants