lass 2 new-repos: allow secret collaborateurs
This commit is contained in:
parent
c2714ce8ce
commit
2db4f7f0af
@ -1,6 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with import ../../tv/4lib { inherit lib pkgs; };
|
with import ../../tv/4lib { inherit lib pkgs; };
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
out = {
|
out = {
|
||||||
@ -8,14 +9,14 @@ let
|
|||||||
enable = true;
|
enable = true;
|
||||||
root-title = "public repositories at ${config.krebs.build.host.name}";
|
root-title = "public repositories at ${config.krebs.build.host.name}";
|
||||||
root-desc = "keep calm and engage";
|
root-desc = "keep calm and engage";
|
||||||
inherit repos rules;
|
repos = mapAttrs (_: s: removeAttrs s ["collaborators"]) repos;
|
||||||
|
rules = rules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
repos = mapAttrs (_: s: removeAttrs s ["collaborators"]) (
|
repos =
|
||||||
public-repos //
|
public-repos //
|
||||||
optionalAttrs config.krebs.build.host.secure restricted-repos
|
optionalAttrs config.krebs.build.host.secure restricted-repos;
|
||||||
);
|
|
||||||
|
|
||||||
rules = concatMap make-rules (attrValues repos);
|
rules = concatMap make-rules (attrValues repos);
|
||||||
|
|
||||||
@ -50,8 +51,8 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
make-restricted-repo = name: { desc ? null, ... }: {
|
make-restricted-repo = name: { collaborators ? [], desc ? null, ... }: {
|
||||||
inherit name desc;
|
inherit name collaborators desc;
|
||||||
public = false;
|
public = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user