GitHub icon
To automate your workflows, you need to sign an account first. It’s free.

GitHub Integration for

Quick Start

use github_flows::{
    event_handler, get_octo, listen_to_event,
    octocrab::models::{events::payload::EventPayload, reactions::ReactionContent},

#[tokio::main(flavor = "current_thread")]
pub async fn on_deploy() {
    // `some_login` must be authed in
    listen_to_event(&GithubLogin::Provided(String::from("some_login")), "some_owner", "some_repo", vec!["issue_comment"]).await;

async fn handler(payload: EventPayload) {
    if let EventPayload::IssueCommentEvent(e) = payload {
        let comment_id =;

        // installed app login
        let octo = get_octo(&GithubLogin::Provided(String::from("some_login")));

        let _reaction = octo
            .issues("some_owner", "some_repo")
            .create_comment_reaction(comment_id, ReactionContent::Rocket)

Note that the tokio used here is tokio_wasi with macros and rt features

example Cargo.toml

name = "demo"
version = "0.1.0"
edition = "2021"

path = "src/"
crate-type = ["cdylib"]

github-flows = "0.6"
tokio_wasi = { version = "1.25.1", features = ["macros", "rt"] }
serde_json = "1"

listen_to_event is responsible for registering a listener for some_owner/some_repo. When a new issue_number Event coming, the fn handler decorated by event_handler macro is called with received EventPayload then get_octo is used to get a Octocrab Instance to call GitHub api