17 Commits

Author SHA1 Message Date
Michael Daniels
843634b667 Revert "ci/github-script/reviewers: revoke stale review requests"
This reverts commit 2d34258228.
2026-05-18 17:26:09 -04:00
Michael Daniels
acb7b7a38c Revert "ci/github-script/reviewers: keep team members when revoking stale requests"
This reverts commit b721b82180.
2026-05-18 17:25:58 -04:00
Harinn
b721b82180 ci/github-script/reviewers: keep team members when revoking stale requests
Fixes:
https://redirect.github.com/NixOS/nixpkgs/pull/519758#issuecomment-4478985966
2026-05-18 23:14:26 +07:00
Harinn
2d34258228 ci/github-script/reviewers: revoke stale review requests
New feature: revoke review requests from a reviewer when the reason they
were review-requested in the first place is gone (e.g. force-pushed),
while preserving reviewers who voluntarily engaged.
2026-05-15 11:02:42 +07:00
Silvan Mosberger
71e704768d ci/github-script/reviewers.js: Fix reviewer API request
It takes arrays, not sets, see https://github.com/NixOS/nixpkgs/actions/runs/21735690914/job/62700395870?pr=487491
2026-02-07 16:04:18 +01:00
Silvan Mosberger
b0b2c24be9 ci: First-class team package maintainer review requests
Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
2026-02-07 13:52:46 +01:00
Michael Daniels
0d74c65927 Revert "ci: First-class team package maintainer review requests"
This reverts commit 193deb8533.
2026-02-05 21:50:27 -05:00
Silvan Mosberger
193deb8533 ci: First-class team package maintainer review requests
Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
2026-02-05 14:52:47 +01:00
Philip Taron
e6e6c544ae ci/github-script/bot: handle deleted maintainer accounts gracefully
When a maintainer deletes their GitHub account, the bot would crash with a 404 error when trying to fetch their user info via `/user/{id}`.

This caused the scheduled bot workflow to fail repeatedly until manual intervention (e.g., closing/reopening the affected PR to clear the requested reviewer).

Fix by returning null from getUser() for 404 responses and filtering out null users when building the reviewers list.
2026-01-20 06:27:34 -08:00
Michael Daniels
25b6c45ef4 ci/github-script/reviewers: convert all usernames to lowercase (part 2)
Context: #464046
2025-11-22 15:24:39 -05:00
Michael Daniels
a88711a02d ci/github-script/reviewers: convert all usernames to lowercase
Should fix https://github.com/nixos/nixpkgs/pull/463686#issuecomment-3563126753
2025-11-22 15:00:42 -05:00
Wolfgang Walther
17199e5ff6 ci/github-script/reviewers: add TODO about future optimization
We still use a few too many API requests by checking team members for
collaborator status - we can improve on that in the future.
2025-11-06 16:17:17 +01:00
Wolfgang Walther
9efe926863 ci/github-script/reviewers: exit early for treewides
When hitting a treewide, we would previously find the username for each
user and then check all of them for collaborator status - only to then
realize that this results in more than 15 reviewers and exit.

We can put a simple stop-gap in, even before de-duplicating the combined
lists of maintainers and owners as safe guard. We could still hit huge
numbers of code owners, but in practice we don't nearly as many as
maintainers, so this will be sufficient for now.
2025-11-06 16:17:12 +01:00
Wolfgang Walther
4658d0d5a3 ci/github-script/bot: fix needs reviewer label
The recent change to use the result of requesting reviewers for setting
the `needs: reviewer` label caused a regression: It would not set the
label for PRs where no reviewers were requested, because *too many were
eligible*. Still - these PRs don't have reviewers, so they need
attention otherwise - via the label.
2025-11-06 15:10:58 +01:00
Wolfgang Walther
d76ffa4136 ci/github-script/bot: fix collaborator warning
This was introduced shortly before merge of the reviewers.js file, but
not actually tested - I thought it was not easy to find a PR triggering
this warning. However, the scheduled run told me otherwise: The
staging-next PR is the perfect candidate.
2025-11-06 10:20:48 +01:00
Wolfgang Walther
e68b0aef13 ci/github-script/reviewers: improve "needs: reviewers" label
This should fix the bug where the "needs: reviewer" label was set too
early, just to be removed immediately, because reviewers were then
requested.
2025-11-05 21:59:02 +01:00
Wolfgang Walther
a23d0ab24c ci/github-script/bot: request reviewers
This migrates the bash code to request reviewers to github-script. This
will allow multiple nice improvements later on, but at this stage it's
mostly a reduction in code and complexity.
2025-11-05 21:58:56 +01:00