Skip to content

Commit

Permalink
Re-enable rfd jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Jan 25, 2024
1 parent 037c16f commit 6b52e1e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 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
6 changes: 3 additions & 3 deletions webhooky/src/server.rs
Original file line number Diff line number Diff line change
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 6b52e1e

Please sign in to comment.