See comment, but TLDR this is for backwards-compatibility.
(See 479628, where it failed to dismiss after fixing.)
We don't bother with `prepare.js` because it always errors
(and so should never be dismissed).
I have simply added the needed comments to each of `check-target-branch.js`'s
pre-existing reviews, because there are so few.
(cherry picked from commit 7a74549a85)
You can technically have multiple reviews requesting changes, but
there's no good way to dismiss all of the reviews requesting changes from
the same user using the UI.
This makes minimization impossible (because all but one of the reviews is not
dismissed, even though the PR is no longer blocked due to the review
in GitHub's system).
As a workaround, we will only comment.
CI will still fail when appropriate.
(cherry picked from commit c9225057c9)
Checks all PR commit messages for version update pattern
like 'packagename: X.Y.Z -> A.B.C'.
Matches: 1.2.3, 0-unstable-2024-01-15, 1.3rc1, alpha, unstable
(cherry picked from commit bf5645a0ed)
Checks all PR commit messages for ': init at' pattern and
requires eval to report added packages (attrdiff.added).
(cherry picked from commit bb0ec76b44)
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.
(cherry picked from commit e6e6c544ae)
Apparently any effects from this change haven’t shown up noticeably
in GitHub’s metrics, to the point where they’re not sure if it
was taking effect on the backend. Our contact is going to look at
getting something into the API response to help debug whether it’s
actually working or not, but agreed that we should just revert for
now. Since they have apparently reduced replica sync issues further
through other changes on their end, there shouldn’t be any urgent
need to make any changes here anyway.
This reverts commit 18b30c8ce1.
(cherry picked from commit 742b1081c5)
Dismissals are done automatically by commits.js, even for reviews from
check-target-branches.js. This is not desirable.
The solution is
(1) do not decline to post a review because it was already dismissed
(because it may have not been dismissed by a human, and circumstances may
have changed), and
(2) reword the auto-dismissal message to not imply that whatever
problems were present are fixed.
(cherry picked from commit e05e984689)
This restricts github automatically merging master with commit message
"Merge branch 'NixOS:master' into ...". Although we don't explicitly
prohibit not space after colons, we don't use it in any of the examples.
It's also enforced in https://www.conventionalcommits.org/en/v1.0.0/
(cherry picked from commit c04dc5869d)
Follow-up to 7cf5972410
While the JS script already returned early, we can save a few resources
by skipping the job entirely when there's no `pull_request` context.
(cherry picked from commit 7cfe9b8c85)
This is an experiment and can be reverted a few days from now; if
the results are positive on GitHub’s end, then we may want to make
the merge conflict checks run less frequently than the rest of the
labelling tasks.
(cherry picked from commit 18b30c8ce1)
I fixed this for the maintainer maps, but the artifact that was causing the
particular issue that prompted me to try to fix it was actually the
pagination cursor. So fix that too.
Related: #464046.