Crates.io | tide-github |
lib.rs | tide-github |
version | 0.3.0 |
source | src |
created_at | 2022-03-20 16:53:49.453521 |
updated_at | 2022-03-24 00:52:07.564894 |
description | Easily process Github webhooks using tide |
homepage | |
repository | https://github.com/paritytech/tide-github |
max_upload_size | |
id | 553648 |
size | 25,949 |
Process Github webhooks in tide.
use tide_github::Event;
#[async_std::main]
async fn main() -> tide::Result<()> {
let mut app = tide::new();
let github = tide_github::new("My Github webhook s3cr#t")
.on(Event::IssueComment, |payload| {
println!("Got payload for repository {}", payload.repository.name);
})
.build();
app.at("/gh_webhooks").nest(github);
app.listen("127.0.0.1:3000").await?;
Ok(())
}