Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't re-request review if approval is already present for that reviewer #110

Open
maschwenk opened this issue Sep 21, 2023 · 1 comment

Comments

@maschwenk
Copy link

It seems the auto-request will start even if a suitable reviewer has already approved the PR. This creates a lot of noise.

@necojackarc
Copy link
Owner

@maschwenk I've just noticed that for some reason the latest release hasn't been marked as really the latest, and the previous version has a bug, which I reverted in https://github.com/necojackarc/auto-request-review/releases/tag/v0.12.0. Do you reckon this may be causing your issue?

jamoor-moj added a commit to Mojang/auto-request-review that referenced this issue Feb 21, 2024
In the existing action, the workflow will assign a reviewer regardless of if that reviewer has already been assigned to the pull request: necojackarc#110

This additionally has the issue of sending extra notifications about being added to a review that you have previously been added to, making it more difficult to manage PR review requests.

To solve this, we add an additional REST call to GH to retrieve the current users that have already been assigned to the PR. We then remove those previously assigned aliases from the list of aliases the workflow will assign.

There is also a slight optimization to not make the PUT REST call to add reviewers if there exists no list of reviewers to add (instead of making the call with no reviewers).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants