Add some little support for other repos for testing

This commit is contained in:
Graham Christensen 2018-03-05 07:38:52 -05:00
parent 9c2771f409
commit 7a7d99bfda
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
3 changed files with 9 additions and 5 deletions

View file

@ -7,7 +7,9 @@
}, },
"runner": { "runner": {
"repos": [ "repos": [
"nixos/nixpkgs" "nixos/nixpkgs",
"nixos/ofborg",
"grahamc/nixpkgs"
], ],
"trusted_users": [ "trusted_users": [
"7c6f434c", "7c6f434c",

View file

@ -44,10 +44,12 @@ impl ACL {
} }
pub fn can_build_unrestricted(&self, user: &str, repo: &str) -> bool { pub fn can_build_unrestricted(&self, user: &str, repo: &str) -> bool {
if repo.to_lowercase() != "nixos/nixpkgs" { if repo.to_lowercase() == "nixos/nixpkgs" {
return self.trusted_users.contains(&user.to_lowercase());
} else if user == "grahamc" {
return true;
} else {
return false; return false;
} }
return self.trusted_users.contains(&user.to_lowercase());
} }
} }

View file

@ -71,7 +71,7 @@ fn main() {
.bind_queue(easyamqp::BindQueueConfig { .bind_queue(easyamqp::BindQueueConfig {
queue: "build-inputs".to_owned(), queue: "build-inputs".to_owned(),
exchange: "github-events".to_owned(), exchange: "github-events".to_owned(),
routing_key: Some("issue_comment.nixos/nixpkgs".to_owned()), routing_key: Some("issue_comment.*".to_owned()),
no_wait: false, no_wait: false,
arguments: None, arguments: None,
}) })