https://github.com/paritytech/tide-github
Easily process Github webhooks using with Rust and tide (https://github.com/http-rs/tide)
https://github.com/paritytech/tide-github
Last synced: about 1 year ago
JSON representation
Easily process Github webhooks using with Rust and tide (https://github.com/http-rs/tide)
- Host: GitHub
- URL: https://github.com/paritytech/tide-github
- Owner: paritytech
- License: apache-2.0
- Created: 2022-03-20T16:44:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T00:56:02.000Z (about 4 years ago)
- Last Synced: 2025-04-15T04:49:30.205Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tide-github
Process Github webhooks in [tide](https://github.com/http-rs/tide).
[API docs](https://docs.rs/tide-github/0.3.0/tide_github/)
```Rust
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(())
}
```