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