Merge pull request #72 from Xuanwo/fix-gitlab-support

Fix gitlab support
This commit is contained in:
依云 2018-06-09 00:08:51 +08:00 committed by GitHub
commit 07a97e04c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ __pycache__/
*.pyc
*.pyo
.travis.pub
.pytest_cache/

View file

@ -11,8 +11,8 @@ from ..sortversion import sort_version_keys
logger = structlog.get_logger(logger_name=__name__)
GITLAB_URL = 'https://%s/api/v3/projects/%s/repository/commits?ref_name=%s'
GITLAB_MAX_TAG = 'https://%s/api/v3/projects/%s/repository/tags'
GITLAB_URL = 'https://%s/api/v4/projects/%s/repository/commits?ref_name=%s'
GITLAB_MAX_TAG = 'https://%s/api/v4/projects/%s/repository/tags'
async def get_version(name, conf, **kwargs):
repo = urllib.parse.quote_plus(conf.get('gitlab'))