Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit 6b6815a

Browse files
Merge pull request #410 from ehuss/mentions-cur_dir
Remove vestigial cur_dir code.
2 parents 9325d0b + 6d7f6da commit 6b6815a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

highfive/newpr.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -362,22 +362,13 @@ def get_to_mention(self, diff, author):
362362
to_mention = set()
363363
# If there's directories with specially assigned groups/users
364364
# inspect the diff to find the directory with the most additions
365-
cur_dir = None
366365
for line in diff.split('\n'):
367366
if line.startswith("diff --git "):
368-
# update cur_dir
369-
cur_dir = None
370367
parts = line[line.find(" b/") + len(" b/"):].split("/")
371368
if not parts:
372369
continue
373-
cur_dir = "/".join(parts[:2])
374370
full_dir = "/".join(parts)
375371

376-
# A few heuristics to get better reviewers
377-
if cur_dir.startswith('src/librustc'):
378-
cur_dir = 'src/librustc'
379-
if cur_dir == 'src/test':
380-
cur_dir = None
381372
if len(full_dir) > 0:
382373
for entry in mentions:
383374
# Check if this entry is a prefix

0 commit comments

Comments
 (0)