Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ofborg/src/tasks/evaluate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ pub struct EvaluationWorker<E> {
tag_paths: HashMap<String, Vec<String>>,
}

/// Creates a finished github check, indicating that the ofborg eval started.
/// This is a workaround github REST api, that only exposes finished external checks.
/// We use the check status in our "Waiting for github action"
fn post_eval_started_status(
api: hubcaps::statuses::Statuses,
commit: String,
) -> Result<(), EvalWorkerError> {
Ok(CommitStatus::new(
api,
commit,
"ofborg-eval-started".to_owned(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graham has expressed the desire to remove the grahamc prefix from all the ofborg checks (https://twitter.com/grhmc/status/1353171107550027776 as a recent example), so I decided to do that for this new one here.

"Evaluation started".to_owned(),
None,
)
.set(hubcaps::statuses::State::Success)?)
}

impl<E: stats::SysEvents> EvaluationWorker<E> {
#[allow(clippy::too_many_arguments)]
pub fn new(
Expand Down Expand Up @@ -315,6 +332,8 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {

overall_status.set_with_description("Starting", hubcaps::statuses::State::Pending)?;

post_eval_started_status(repo.statuses(), job.pr.head_sha.clone())?;

evaluation_strategy.pre_clone()?;

let project = self
Expand Down