Skip to content

Conversation

@Rocketknight1
Copy link
Member

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)

@Rocketknight1 Rocketknight1 marked this pull request as ready for review April 14, 2025 16:33
@github-actions github-actions bot requested a review from ArthurZucker April 14, 2025 16:34
@Rocketknight1
Copy link
Member Author

cc @ydshieh!

@Rocketknight1 Rocketknight1 removed the request for review from ArthurZucker April 14, 2025 16:48
Comment on lines +58 to +70
# 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
Copy link
Collaborator

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.

Copy link
Member Author

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

Copy link
Collaborator

@ydshieh ydshieh left a 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

@HuggingFaceDocBuilderDev

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.

@Rocketknight1 Rocketknight1 merged commit 4e63a17 into main Apr 14, 2025
11 checks passed
@Rocketknight1 Rocketknight1 deleted the no-auto-assign-for-hf-authors branch April 14, 2025 17:17
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
* Don't auto-assign reviewers when the author is in HF

* Trigger tests
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* Don't auto-assign reviewers when the author is in HF

* Trigger tests
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.

4 participants