From 1335a5b25f69e9b77400d24aa4002999e764cf0e Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Thu, 28 Jun 2018 11:33:42 +0200 Subject: [PATCH] swh.lister.gitlab: Use gitlab's index identifier (page id) And not 'project' id --- swh/lister/gitlab/lister.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swh/lister/gitlab/lister.py b/swh/lister/gitlab/lister.py index dc658cf..e8d26f8 100644 --- a/swh/lister/gitlab/lister.py +++ b/swh/lister/gitlab/lister.py @@ -11,10 +11,12 @@ from .models import GitlabModel class GitlabLister(SWHIndexingHttpLister): # Path to give and mentioning the last id for the next page - PATH_TEMPLATE = '/projects?since=%d&visibility=public' + PATH_TEMPLATE = '/projects?page=%d' # base orm model MODEL = GitlabModel - API_URL_INDEX_RE = re.compile(r'^.*/projects\?since=(\d+)&visibility=public') + # gitlab api do not have an indexable identifier so using the page + # id + API_URL_INDEX_RE = re.compile(r'^.*/projects.*\&page=(\d+).*') def get_model_from_repo(self, repo): return {