diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index a0604bbc8fcd..487c70f267c9 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -267,11 +267,18 @@ jobs: -f "labels[]=$toAdd" done < <(comm -13 before after) + # maintainers.json contains GitHub IDs. Look up handles to request reviews from. + # There appears to be no API to request reviews based on GitHub IDs + jq -r 'keys[]' comparison/maintainers.json \ + | while read -r id; do gh api /user/"$id"; done \ + | jq -s '{ reviewers: map(.login) }' \ + > reviewers.json + # Request reviewers from maintainers of changed output paths GH_TOKEN=${{ steps.app-token.outputs.token }} gh api \ --method POST \ /repos/${{ github.repository }}/pulls/${{ github.event.number }}/requested_reviewers \ - --input <(jq '{ reviewers: keys }' comparison/maintainers.json) + --input reviewers.json env: GH_TOKEN: ${{ github.token }} diff --git a/ci/eval/compare/maintainers.nix b/ci/eval/compare/maintainers.nix index 0c08f85cec43..6728929952d4 100644 --- a/ci/eval/compare/maintainers.nix +++ b/ci/eval/compare/maintainers.nix @@ -92,7 +92,7 @@ let builtins.map ( pkg: builtins.map (maintainer: { - handle = lib.toLower maintainer.github; + id = maintainer.githubId; packageName = pkg.name; dueToFiles = pkg.filenames; }) pkg.maintainers @@ -103,9 +103,9 @@ let ping: collector: collector // { - "${ping.handle}" = [ + "${toString ping.id}" = [ { inherit (ping) packageName dueToFiles; } - ] ++ (collector."${ping.handle}" or [ ]); + ] ++ (collector."${toString ping.id}" or [ ]); } ) { } listToPing;