ci/eval/compare: manage the "by: package-maintainer" label

While OfBorg is still adding these, it takes a much longer time to do so
compared to the eval action. Since we're adding rebuild labels, I think
it'd be nice to just do it within the eval action.
This commit is contained in:
Winter
2025-05-15 17:24:53 -04:00
parent f71ccdc1bc
commit d52066e2b1
2 changed files with 15 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
beforeResultDir,
afterResultDir,
touchedFilesJson,
githubAuthorId,
byName ? false,
}:
let
@@ -114,7 +115,15 @@ let
# Adds "10.rebuild-*-stdenv" label if the "stdenv" attribute was changed
++ lib.mapAttrsToList (kernel: _: "10.rebuild-${kernel}-stdenv") (
lib.filterAttrs (_: kernelRebuilds: kernelRebuilds ? "stdenv") rebuildsByKernel
);
)
# Adds the "11.by: package-maintainer" label if all of the packages directly
# changed are maintained by the PR's author. (https://github.com/NixOS/ofborg/blob/df400f44502d4a4a80fa283d33f2e55a4e43ee90/ofborg/src/tagger.rs#L83-L88)
++ lib.optional (
maintainers ? ${githubAuthorId}
&& lib.all (lib.flip lib.elem maintainers.${githubAuthorId}) (
lib.flatten (lib.attrValues maintainers)
)
) "11.by: package-maintainer";
}
);