Skip to content

Missing file for gitlab #5

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

Merged
merged 1 commit into from
Jan 3, 2015
Merged
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
4 changes: 2 additions & 2 deletions giturlparse/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .bitbucket import BitbucketPlatform
from .friendcode import FriendCodePlatform
from .assembla import AssemblaPlatform
from .gitlab import GitlabPlatform
from .gitlab import GitLabPlatform


# Supported platforms
Expand All @@ -20,4 +20,4 @@
('base', BasePlatform()),
)

PLATFORMS_MAP = dict(PLATFORMS)
PLATFORMS_MAP = dict(PLATFORMS)
19 changes: 19 additions & 0 deletions giturlparse/platforms/gitlab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Imports
from .base import BasePlatform


class GitLabPlatform(BasePlatform):
PATTERNS = {
'https': r'https://(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git',
'ssh': r'git@(?P<domain>.+):(?P<owner>.+)/(?P<repo>.+).git',
'git': r'git://(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git',
}
FORMATS = {
'https': r'https://%(domain)s/%(owner)s/%(repo)s.git',
'ssh': r'git@%(domain)s:%(owner)s/%(repo)s.git',
'git': r'git://%(domain)s/%(owner)s/%(repo)s.git'
}
DEFAULTS = {
'_user': 'git'
}