forked from the-distro/ofborg
nixpkgs: pass in issue_ref
This commit is contained in:
parent
721276fbd1
commit
d9d3ac5fcb
|
@ -1,3 +1,4 @@
|
|||
use hubcaps::issues::IssueRef;
|
||||
use ofborg::checkout::CachedProjectCo;
|
||||
use ofborg::commitstatus::CommitStatus;
|
||||
use ofborg::evalchecker::EvalChecker;
|
||||
|
@ -5,14 +6,16 @@ use ofborg::message::buildjob::BuildJob;
|
|||
use std::path::Path;
|
||||
use tasks::eval::{EvaluationStrategy, StepResult};
|
||||
|
||||
pub struct NixpkgsStrategy {}
|
||||
impl NixpkgsStrategy {
|
||||
pub fn new() -> NixpkgsStrategy {
|
||||
Self {}
|
||||
pub struct NixpkgsStrategy<'a> {
|
||||
issue_ref: &'a IssueRef<'a>,
|
||||
}
|
||||
impl<'a> NixpkgsStrategy<'a> {
|
||||
pub fn new(issue_ref: &'a IssueRef) -> NixpkgsStrategy<'a> {
|
||||
Self { issue_ref }
|
||||
}
|
||||
}
|
||||
|
||||
impl EvaluationStrategy for NixpkgsStrategy {
|
||||
impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
|
||||
fn pre_clone(&mut self) -> StepResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for EvaluationWorker<E>
|
|||
let auto_schedule_build_archs: Vec<systems::System>;
|
||||
|
||||
let mut evaluation_strategy: Box<eval::EvaluationStrategy> = if job.is_nixpkgs() {
|
||||
Box::new(eval::NixpkgsStrategy::new())
|
||||
Box::new(eval::NixpkgsStrategy::new(&issue_ref))
|
||||
} else {
|
||||
Box::new(eval::GenericStrategy::new())
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue