Never request reviews on staging-esque branches #579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PRs from staging-next usually never cause ofborg to request reviews from
package maintainers because the change count will be high enough even in
the beginning to prevent it. However the key insight is that we don't
want to not request reviews because there would be too many, but rather
the changes have already been reviewed (before being merged into staging
for example).
There are in fact branches similar to staging-next, like
haskell-updates, where ofborg will still request reviews, but
unnecessarily so, because the branch mostly contains already reviewed
and merged PRs. In NixOS/nixpkgs#139967 in
particular you can see a good example of this, including Damien Cassou
fighting the ofborg request for review…
This commit adds a new condition to the review requesting logic and
checks if the head of the PR is a staging branch (i. e. matches
staging-next* or haskell-updates and is in the NixOS/nixpkgs
repository). This should prevent such cases reliably in the future.
The list of branches can be extended easily.
Help with testing / reviewing would be appreciated, I can't really run ofborg locally to test this change…