diff --git a/webhooky/src/handlers_github/mod.rs b/webhooky/src/handlers_github/mod.rs index 9a0ef6a2b..cc9926020 100644 --- a/webhooky/src/handlers_github/mod.rs +++ b/webhooky/src/handlers_github/mod.rs @@ -156,43 +156,43 @@ pub async fn handle_github(rqctx: &RequestContext, event: GitHubW let github = Arc::new(company.authenticate_github()?); match repo_name { - Repo::RFD => match event_type { - EventType::Push => { - match handle_rfd_push(github.clone(), &api_context.app, event.clone()).await { - Ok(_) => ( /* Silence */ ), - Err(e) => { - event - .create_comment(&github, &event.get_error_string("updating RFD on `push`", e)) - .await?; - } - } - } - EventType::PullRequest => { - // Let's create the check run. - let check_run_id = event.create_check_run(&github).await?; - - match handle_rfd_pull_request(&api_context.app, event.clone(), &company).await { - Ok((conclusion, message)) => { - event - .update_check_run(&github, check_run_id, &message, conclusion) - .await?; - } - Err(e) => { - event - .update_check_run( - &github, - check_run_id, - &event.get_error_string("updating RFD on `pull_request`", e), - octorust::types::ChecksCreateRequestConclusion::Failure, - ) - .await?; - } - } - } - EventType::CheckRun => {} - EventType::CheckSuite => {} - _ => (), - }, + // Repo::RFD => match event_type { + // EventType::Push => { + // match handle_rfd_push(github.clone(), &api_context.app, event.clone()).await { + // Ok(_) => ( /* Silence */ ), + // Err(e) => { + // event + // .create_comment(&github, &event.get_error_string("updating RFD on `push`", e)) + // .await?; + // } + // } + // } + // EventType::PullRequest => { + // // Let's create the check run. + // let check_run_id = event.create_check_run(&github).await?; + + // match handle_rfd_pull_request(&api_context.app, event.clone(), &company).await { + // Ok((conclusion, message)) => { + // event + // .update_check_run(&github, check_run_id, &message, conclusion) + // .await?; + // } + // Err(e) => { + // event + // .update_check_run( + // &github, + // check_run_id, + // &event.get_error_string("updating RFD on `pull_request`", e), + // octorust::types::ChecksCreateRequestConclusion::Failure, + // ) + // .await?; + // } + // } + // } + // EventType::CheckRun => {} + // EventType::CheckSuite => {} + // _ => (), + // }, Repo::Configs => { if let EventType::Push = event_type { match handle_configs_push(&github, &api_context.app, event.clone(), &company).await { diff --git a/webhooky/src/server.rs b/webhooky/src/server.rs index 25e5fc0ba..fb8febd27 100644 --- a/webhooky/src/server.rs +++ b/webhooky/src/server.rs @@ -155,7 +155,7 @@ fn create_api() -> ApiDescription { api.register(trigger_sync_other_create).unwrap(); api.register(trigger_sync_recorded_meetings_create).unwrap(); api.register(trigger_sync_repos_create).unwrap(); - api.register(trigger_sync_rfds_create).unwrap(); + // api.register(trigger_sync_rfds_create).unwrap(); api.register(trigger_sync_shipments_create).unwrap(); api.register(trigger_sync_salesforce_create).unwrap(); api.register(trigger_sync_shorturls_create).unwrap(); @@ -276,9 +276,9 @@ pub async fn server( scheduler .every(16.hours()) .run(enclose! { (server_context) move || create_do_job_fn(server_context.clone(), "sync-repos")}); - scheduler - .every(14.hours()) - .run(enclose! { (server_context) move || create_do_job_fn(server_context.clone(), "sync-rfds")}); + // scheduler + // .every(14.hours()) + // .run(enclose! { (server_context) move || create_do_job_fn(server_context.clone(), "sync-rfds")}); scheduler .every(30.minutes()) .run(enclose! { (server_context) move || create_do_job_fn(server_context.clone(), "sync-salesforce")});