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

Add Reviewer Alias Validation to the Action #7

Merged
merged 8 commits into from
Dec 10, 2024

Conversation

jamoor-moj
Copy link

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.

@jamoor-moj jamoor-moj merged commit e43a7a4 into master Dec 10, 2024
1 check failed
@jamoor-moj jamoor-moj deleted the jamoor/notifyPermission branch December 13, 2024 17:29
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

Successfully merging this pull request may close these issues.

2 participants