forked from necojackarc/auto-request-review
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent Non Collaborator Aliases Version 2: Using Permission API and …
…Batch Call (#6) In a previous PR (#5), the `request reviewer` call was converted from a batch call to multiple individual calls in order to support cases where an alias no longer has access to the repo. In very rare circumstances, it has been reported that the action will actually remove add (and then automatically get removed) from the pull request. Since the action doesn't invoke any `remove reviewer` APIs, the only theory so far is that making multiple edit request simultaneously has exposed a rare syncronous problem, usually when combined with [auto assignment](https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team#about-auto-assignment). This scenario is rare enough that it has been difficult to get reproductions of the issue in test environments. The proposed solution is to instead async request the permission status of every alias the action will attempt to add. After locally filtering out all aliases that do not have permissions, make a batch request with all of the remaining aliases. This adds 1 extra network call compared to the solution in 5, but reduces the number of network calls attempting to edit the PR down to 1.
- Loading branch information
1 parent
034fb67
commit 4515b0a
Showing
5 changed files
with
369 additions
and
146 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.