From 9d32a25c554350523fb7f78b9a0cade3764be2ab Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Sat, 9 Jun 2018 00:02:02 +0800 Subject: [PATCH] gitlab: Upgrade to API v4 Signed-off-by: Xuanwo --- nvchecker/source/gitlab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvchecker/source/gitlab.py b/nvchecker/source/gitlab.py index 889bb80..8cce75e 100644 --- a/nvchecker/source/gitlab.py +++ b/nvchecker/source/gitlab.py @@ -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'))