From b5f70a53c08a6208b67607278baef3510608602e Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 24 Nov 2017 13:32:22 -0500 Subject: [PATCH] Specify the subset when creating a build job --- ofborg/src/message/buildjob.rs | 9 ++++++++- ofborg/src/tasks/githubcommentfilter.rs | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ofborg/src/message/buildjob.rs b/ofborg/src/message/buildjob.rs index f884356..2ba10fb 100644 --- a/ofborg/src/message/buildjob.rs +++ b/ofborg/src/message/buildjob.rs @@ -8,7 +8,14 @@ use amqp::protocol; pub struct BuildJob { pub repo: Repo, pub pr: Pr, - pub attrs: Vec + pub subset: Option, + pub attrs: Vec, +} + +#[derive(Serialize, Deserialize, Debug)] +pub enum Subset { + Nixpkgs, + NixOS, } pub fn from(data: &Vec) -> Result { diff --git a/ofborg/src/tasks/githubcommentfilter.rs b/ofborg/src/tasks/githubcommentfilter.rs index 10ecb53..3aafe0f 100644 --- a/ofborg/src/tasks/githubcommentfilter.rs +++ b/ofborg/src/tasks/githubcommentfilter.rs @@ -99,7 +99,8 @@ impl worker::SimpleWorker for GitHubCommentWorker { head_sha: pr.head.sha.clone(), target_branch: Some(pr.base.commit_ref.clone()) }, - attrs: attrs + subset: Some(buildjob::Subset::Nixpkgs), + attrs: attrs, }; let props = BasicProperties {