ci/eval/compare: only check changed attrpaths

It makes no sense to check newly added attrpaths for maintainers on the
target branch - by definition these attrpaths won't exist, yet. We can
avoid falling back to `null` for these etc.

(cherry picked from commit e88dd3a8b2)
This commit is contained in:
Wolfgang Walther
2025-08-30 15:43:47 +02:00
committed by github-actions[bot]
parent f6634a6670
commit d766035d65
2 changed files with 3 additions and 2 deletions

View File

@@ -77,6 +77,7 @@ let
# - values: lists of `packagePlatformPath`s
diffAttrs = builtins.fromJSON (builtins.readFile "${combinedDir}/combined-diff.json");
changedPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.changed;
rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.rebuilds;
removedPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.removed;
@@ -116,7 +117,7 @@ let
);
maintainers = callPackage ./maintainers.nix { } {
changedattrs = lib.attrNames (lib.groupBy (a: a.name) rebuildsPackagePlatformAttrs);
changedattrs = lib.attrNames (lib.groupBy (a: a.name) changedPackagePlatformAttrs);
changedpathsjson = touchedFilesJson;
removedattrs = lib.attrNames (lib.groupBy (a: a.name) removedPackagePlatformAttrs);
inherit byName;

View File

@@ -28,7 +28,7 @@ let
}) (changedattrs ++ removedattrs);
attrsWithPackages = builtins.map (
pkg: pkg // { package = lib.attrsets.attrByPath pkg.path null pkgs; }
pkg: pkg // { package = lib.getAttrFromPath pkg.path pkgs; }
) enrichedAttrs;
attrsWithMaintainers = builtins.map (