Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Disable rfd handling
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Feb 2, 2024
1 parent 24db0c3 commit dfa4922
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 deletions.
74 changes: 37 additions & 37 deletions webhooky/src/handlers_github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,43 +156,43 @@ pub async fn handle_github(rqctx: &RequestContext<ServerContext>, 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 {
Expand Down
8 changes: 4 additions & 4 deletions webhooky/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn create_api() -> ApiDescription<ServerContext> {
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();
Expand Down Expand Up @@ -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")});
Expand Down

0 comments on commit dfa4922

Please sign in to comment.