Skip to content

Commit

Permalink
Correct path for codeowners file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketknight1 committed Jan 22, 2025
1 parent ef3df76 commit 6b0f5b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/assign_reviewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from github import Github
from fnmatch import fnmatch
from collections import Counter
from pathlib import Path

def get_file_owners(file_path, codeowners_lines):
# Process lines in reverse (last matching pattern takes precedence)
Expand All @@ -28,7 +29,8 @@ def main():
repo = g.get_repo("huggingface/transformers")
with open(os.environ['GITHUB_EVENT_PATH']) as f:
event = json.load(f)
with open("codeowners_for_review_action") as f:
script_dir = Path(__file__).parent.absolute()
with open(script_dir / "codeowners_for_review_action") as f:
codeowners_lines = f.readlines()

# The PR number is available in the event payload
Expand Down

0 comments on commit 6b0f5b9

Please sign in to comment.