Skip to content
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

Bugfix: Match Multiple paths. #37

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion giturlparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
r'(?P<resource>[a-z0-9_.-]*)'
r'[:/]*'
r'(?P<port>[\d]+){0,1}'
r'(?P<pathname>\/((?P<owner>[\w\-]+)\/)?'
r'(?P<pathname>\/((?P<owner>[\w\-\/]+)\/)?'
r'((?P<name>[\w\-\.]+?)(\.git)?)?)$'),
re.compile(r'(git\+)?'
r'((?P<protocol>\w+)://)'
Expand Down
11 changes: 11 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,17 @@ def first_match_urls():
'name': 'Stouts.openvpn',
'owner': 'tterranigma',
},
'https://github.com/Group/Owner/Stouts.openvpn.git': {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test case shouldnt be github ; it should be gitlab

'pathname': '/Group/Owner/Stouts.openvpn.git',
'protocols': ['https'],
'protocol': 'https',
'href': 'https://github.com/Group/Owner/Stouts.openvpn.git',
'resource': 'github.com',
'user': None,
'port': None,
'name': 'Stouts.openvpn',
'owner': 'Group/Owner'
}
}


Expand Down