You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For private repositories that have access to the repository restricted, when a reviewer defined in the yaml configuration file does not have access to the repository, the current action will print out a message in the action that we failed to add that reviewer to the pull request. However, the action "succeeds" and only manually checking the logs lets the PR author know that something went wrong.
The proposal in this change is to help PR authors detect when the aliases that are configured to be added to a PR do not have access. A comment gets created in the pull request with the aliases that do not have access. If the PR author solves this permission problem (either by giving access or removing the alias the config), the action will update the previous comment to notify the user that "All issues have been resolved". Only one comment is added by the action, and that comment will get updated based on the issue during that action run.
An additional parameter (`validate_all`) for the action has been added to allow the above validation to be run on every alias in the yaml configuration. This can be useful for scenarios where the PR author is editing the yaml configuration, and the workflow might want to validate those new alias at PR time instead of waiting until that alias is attempted to use in a subsequent PR and it fails.
Note that with the [recent change to GitHub Actions that are created by Dependabot](https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/), the `pull_request` event will no longer give access to your secrets to this action. Instead you will need to use the `pull_request_target` event. If you do this make sure to read [Keeping your GitHub Actions and workflows secure: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) to understand the risks involved.
258
+
259
+
## Reviewer Access and Private Repos
260
+
261
+
The reviewer aliases defined in the configurations must have been given access to the repo in order to
262
+
be added as a code reviewer to the pull request.
263
+
264
+
If the action attempts to assign a reviewer that does not have access to the repo, a comment will be
265
+
automatically addded to the pull request to notify the author that not everyone was assigned.
266
+
```
267
+
The following reviewers did not have access to be added as reviewers, please review their access:
268
+
269
+
Individual Alias
270
+
- jamoor-test-twice
271
+
272
+
Team Alias
273
+
- fake-team-super-stale
274
+
275
+
Comment added by Auto Reviewer Robot 🤖: <Base64UniqueID>
276
+
```
277
+
278
+
If the action is re-run post an administrator giving access to the aliases, or the aliases are removed
279
+
from the config yaml file, the action will update the comment to notify that all issues have been resolved.
280
+
281
+
```
282
+
All reviewer issues have been resolved!
283
+
Comment added by Auto Reviewer Robot 🤖: <Base64UniqueID>
0 commit comments