-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Don't auto-assign reviewers when the author is in HF #37500
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
Conversation
|
cc @ydshieh! |
| # Check if the PR author is in the codeowners file | ||
| for line in codeowners_lines: | ||
| line = line.split('#')[0].strip() | ||
| if not line: | ||
| continue | ||
|
|
||
| # Split into pattern and owners | ||
| parts = line.split() | ||
| owners = [owner.removeprefix("@") for owner in parts[1:]] | ||
|
|
||
| if pr_author in owners: | ||
| return True | ||
| return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we simply using a regex with f'@{pr_autho}' against the codeowner file content? It's justa nit so up to you, but potentially a one line code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd probably work, but it feels just the tiniest bit fragile to me, like it'll be harder to change if we ever change any file formats or anything! You're probably right, but I'm going to leave it as-is just because I'm paranoid, lol
ydshieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me :-) Thanks
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
* Don't auto-assign reviewers when the author is in HF * Trigger tests
* Don't auto-assign reviewers when the author is in HF * Trigger tests
As the title says, we don't want to auto-assign reviewers for staff authors because they can do it themselves (and probably more accurately)