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

"Review cannot be requested from pull request author." error thrown when a default reviewer opens a PR. #31

Closed
a-tokyo opened this issue Feb 11, 2021 · 4 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@a-tokyo
Copy link

a-tokyo commented Feb 11, 2021

When the PR author is assigned as a default reviewer, the action fails with the error "Review cannot be requested from pull request author." .

Expected behavior:
Simply skip the reviewer addition if the reviewer is the same as the PR author.

@necojackarc necojackarc added the bug Something isn't working label Feb 11, 2021
@necojackarc necojackarc self-assigned this Feb 11, 2021
@necojackarc
Copy link
Owner

necojackarc commented Feb 13, 2021

@a-tokyo Thanks for reporting a bug!

Could you share your settings and the author name when you saw the error? I can't seem to reproduce the bug and actually, there is the logic to exclude the author from reviewers in the case you mentioned:

const default_reviewers = fetch_default_reviewers({ config, excludes: [ author ] });

The logic does just a simple comparison, so I wonder whether or not there might be a case-sensitivity issue.

@a-tokyo
Copy link
Author

a-tokyo commented Feb 15, 2021

@necojackarc Thanks for the response!

I don't have the code atm as I replaced it with another library, but I know for a fact that my username sometimes has case sensitivity issues. It's actually A-tokyo. So it might be that.

The Logic I did was to assign a-tokyo and qa-team as default reviewers. a-tokyo is in the QA team as well.

Feel free to either try it out or close the issue = )

@necojackarc
Copy link
Owner

@a-tokyo Thanks. Yeah, it sounds like an issue around case sensitivity. I believe it could work if you used exactly the same username in the settings 👍

I'm happy to leave this issue open as this sounds like a common issue for those who use any capital letters in their usernames. I hope I can find some time and compare the names in a case-insensitive way.

@necojackarc necojackarc added enhancement New feature or request bug Something isn't working invalid This doesn't seem right and removed bug Something isn't working enhancement New feature or request labels Feb 23, 2021
@necojackarc
Copy link
Owner

It turns out this isn't a bug, so I'm closing this issue in order not to confuse us but I've added a new issue #37 to make it more convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants