lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

check-meta: wrap maintainers attribute to include team members (#402991)

authored by winter.bsky.social and committed by

GitHub a7eef26e 221cd6de

+20 -4
+3 -4
ci/eval/compare/maintainers.nix
··· 53 53 // { 54 54 # TODO: Refactor this so we can ping entire teams instead of the individual members. 55 55 # Note that this will require keeping track of GH team IDs in "maintainers/teams.nix". 56 - maintainers = 57 - meta.maintainers or [ ] 58 - ++ lib.flatten (map (team: team.members or [ ]) (meta.teams or [ ])); 56 + maintainers = meta.maintainers or [ ]; 59 57 } 60 58 ) attrsWithPackages; 61 59 ··· 64 62 (lib.lists.unique ( 65 63 builtins.map (pos: lib.strings.removePrefix (toString ../..) pos.file) ( 66 64 builtins.filter (x: x != null) [ 67 - (builtins.unsafeGetAttrPos "maintainers" (drv.meta or { })) 65 + ((drv.meta or { }).maintainersPosition or null) 66 + ((drv.meta or { }).teamsPosition or null) 68 67 (builtins.unsafeGetAttrPos "src" drv) 69 68 # broken because name is always set by stdenv: 70 69 # # A hack to make `nix-env -qa` and `nix search` ignore broken packages.
+17
pkgs/stdenv/generic/check-meta.nix
··· 411 411 isFcitxEngine = bool; 412 412 isIbusEngine = bool; 413 413 isGutenprint = bool; 414 + 415 + # Used for the original location of the maintainer and team attributes to assist with pings. 416 + maintainersPosition = any; 417 + teamsPosition = any; 414 418 }; 415 419 416 420 checkMetaAttr = ··· 589 593 ) 590 594 ] ++ optional (hasOutput "man") "man"; 591 595 } 596 + // { 597 + # CI scripts look at these to determine pings. 598 + maintainersPosition = builtins.unsafeGetAttrPos "maintainers" (attrs.meta or { }); 599 + teamsPosition = builtins.unsafeGetAttrPos "teams" (attrs.meta or { }); 600 + } 592 601 // attrs.meta or { } 593 602 # Fill `meta.position` to identify the source location of the package. 594 603 // optionalAttrs (pos != null) { 595 604 position = pos.file + ":" + toString pos.line; 605 + } 606 + // { 607 + # Maintainers should be inclusive of teams. 608 + # Note that there may be external consumers of this API (repology, for instance) - 609 + # if you add a new maintainer or team attribute please ensure that this expectation is still met. 610 + maintainers = 611 + attrs.meta.maintainers or [ ] 612 + ++ concatMap (team: team.members or [ ]) attrs.meta.teams or [ ]; 596 613 } 597 614 // { 598 615 # Expose the result of the checks for everyone to see.