forked from the-distro/ofborg
Add some little support for other repos for testing
This commit is contained in:
parent
9c2771f409
commit
7a7d99bfda
|
@ -7,7 +7,9 @@
|
|||
},
|
||||
"runner": {
|
||||
"repos": [
|
||||
"nixos/nixpkgs"
|
||||
"nixos/nixpkgs",
|
||||
"nixos/ofborg",
|
||||
"grahamc/nixpkgs"
|
||||
],
|
||||
"trusted_users": [
|
||||
"7c6f434c",
|
||||
|
|
|
@ -44,10 +44,12 @@ impl ACL {
|
|||
}
|
||||
|
||||
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 self.trusted_users.contains(&user.to_lowercase());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ fn main() {
|
|||
.bind_queue(easyamqp::BindQueueConfig {
|
||||
queue: "build-inputs".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,
|
||||
arguments: None,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue