blob: 0ad88745ce981d4a24acd0cfae4daa89a0470bd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use std::env;
use std::process;
use github_suggestion::{Client, SuggestionUrl};
fn main() {
let args: Vec<_> = env::args().collect();
if args.len() < 2 {
process::exit(111);
}
let url: SuggestionUrl = args[1].parse().unwrap();
let client = Client::new(
env!("GITHUB_TOKEN"),
&url.owner,
&url.repo,
).unwrap();
let suggestion = client.fetch(&url.comment_id).unwrap();
print!("{}", suggestion.diff().unwrap());
}
|