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

"Unable to set all the PR reviewers", what is the correct "with team-reviewers" syntax? #751

Open
Thilo-Acrolinx opened this issue Aug 24, 2023 · 5 comments

Comments

@Thilo-Acrolinx
Copy link

Thilo-Acrolinx commented Aug 24, 2023

I would like to automatically assign new PRs to a team by using the "with team-reviewers" configuration:
https:/gradle-update/update-gradle-wrapper-action#team-reviewers

Unfortunately the documentation above does not contain an example of the correct syntax.
Neither /my-organization/my-team-name (used by Dependabot) nor just my-team-name works.
The PR gets created but is not assigned to anyone, instead a comment is added:

Unable to set all the PR reviewers, check the following usernames are correct

Please clarify the documentation and describe the correct syntax for the "with team-reviewers" config.

@huehnerlady
Copy link
Contributor

I haven't used it in a while as we have code owners nearly everywhere now, but we used to use that feature and we used the my-team-name which then worked.

it says in the documentation, that you might need a PAT for the team reviewers to work, did you check that? :)

@Thilo-Acrolinx
Copy link
Author

Thilo-Acrolinx commented Aug 25, 2023

I read the part about access tokens (https:/marketplace/actions/update-gradle-wrapper-action#running-ci-workflows-in-pull-requests-created-by-the-action). If I understand it correctly, such a token is required for the Update Gradle Wrapper to trigger another workflow (e.g. the normal build). But I don't think a PAT is required to add a team as reviewer? Where in the documentation does it say that?

@huehnerlady
Copy link
Contributor

@Thilo-Acrolinx
It says it here:

Note that you might need to use a Personal Access Token (PAT) as repo-token in order to request a review from a team in your organisation.

@Thilo-Acrolinx
Copy link
Author

Alright, not sure why I overlooked this sentence initially but now I see it too. If I understand the problem correctly though, then having a PAT is mandatory, the team-reviewers option will not work without that. The documentation says "you might need to", maybe that statement could be clarified?

In addition, I would suggest to improve the error message from "Unable to set all the PR reviewers, check the following usernames are correct" to "Unable to set the PR reviewers since no Personal Access Token (PAT) is configured" or something like that. The current error message is misleading, since the problem apparently never was the wrong syntax/team name but the lack of a PAT.

@huehnerlady
Copy link
Contributor

@cristiangreco can review and take it onboard. I think Pull Request are always welcome if you wanna have a go at it? I am just a fellow user and contributed some documentation adaption myself 😅

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