2024-04-11 19:48:24 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
sources = (builtins.fromJSON (builtins.readFile ../.sources/sources.json)).pins;
|
|
|
|
|
|
|
|
isGithubSource = source: source.repository.type or "" == "GitHub";
|
|
|
|
isInOrg = source: source.repository.owner or "" == "catppuccin";
|
|
|
|
|
|
|
|
# all github sources should be from the org
|
|
|
|
isGoodSource = source: isGithubSource source -> isInOrg source;
|
|
|
|
# find the ones that aren't
|
|
|
|
badSources = builtins.filter (source: !(isGoodSource source)) (builtins.attrValues sources);
|
2024-04-11 19:48:24 -07:00
|
|
|
in
|
2024-05-21 14:53:46 -07:00
|
|
|
if ((builtins.length badSources) == 0) then "OK" else throw "BAD"
|