Skip to content

Commit

Permalink
Assume * when glob ends with forward slash
Browse files Browse the repository at this point in the history
  • Loading branch information
lkm committed May 5, 2020
1 parent 618cac6 commit e27bb29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion marge/approvals.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def determine_responsible_owners(self, owners_glob, changes):

for change in changes['changes']:
for glob, users in owners_glob.items():
if 'new_path' in change and fnmatch.fnmatch(change['new_path'], glob):
test_glob = glob
if glob.endswith('/'):
test_glob += "*"

if 'new_path' in change and fnmatch.fnmatch(change['new_path'], test_glob):
owners.update(users)

return owners
Expand Down

0 comments on commit e27bb29

Please sign in to comment.