diff --git a/swh/lister/cli.py b/swh/lister/cli.py --- a/swh/lister/cli.py +++ b/swh/lister/cli.py @@ -56,11 +56,11 @@ @click.pass_context def gitlab(ctx, createdb, dropdb): from .gitlab import models - from .gitlab.lister import GitlabLister + from .gitlab.lister import GitLabLister override_conf = {'lister_db_url': ctx.obj['db_url']} - lister = GitlabLister(lister_name='gitlab.com', + lister = GitLabLister(lister_name='gitlab.com', api_baseurl='https://gitlab.com/api/v4/', override_config=override_conf) diff --git a/swh/lister/gitlab/lister.py b/swh/lister/gitlab/lister.py --- a/swh/lister/gitlab/lister.py +++ b/swh/lister/gitlab/lister.py @@ -6,10 +6,10 @@ import time from ..core.indexing_lister import SWHIndexingHttpLister -from .models import GitlabModel +from .models import GitLabModel -class GitlabLister(SWHIndexingHttpLister): +class GitLabLister(SWHIndexingHttpLister): # Path to give and mentioning the last id for the next page PATH_TEMPLATE = '/projects?page=%d' # gitlab api do not have an indexable identifier so using the page @@ -19,7 +19,7 @@ # query is not part of the lookup query. So, we cannot filter # (method filter_before_inject), nor detect and disable origins # (method disable_deleted_repo_tasks) - MODEL = GitlabModel + MODEL = GitLabModel def filter_before_inject(self, models_list): """We cannot filter so returns the models_list as is. diff --git a/swh/lister/gitlab/models.py b/swh/lister/gitlab/models.py --- a/swh/lister/gitlab/models.py +++ b/swh/lister/gitlab/models.py @@ -7,7 +7,7 @@ from ..core.models import ModelBase -class GitlabModel(ModelBase): +class GitLabModel(ModelBase): """a Gitlab repository""" __tablename__ = 'main_gitlab_repos' diff --git a/swh/lister/gitlab/tasks.py b/swh/lister/gitlab/tasks.py --- a/swh/lister/gitlab/tasks.py +++ b/swh/lister/gitlab/tasks.py @@ -6,23 +6,23 @@ IndexingRangeListerTask, IndexingRefreshListerTask, ListerTaskBase) -from .lister import GitlabLister +from .lister import GitLabLister -class GitlabDotComListerTask(ListerTaskBase): +class GitLabDotComListerTask(ListerTaskBase): def new_lister(self): - return GitlabLister(lister_name='gitlab.com', + return GitLabLister(lister_name='gitlab.com', api_baseurl='https://gitlab.com/api/v4') -class IncrementalGitlabDotComLister(GitlabDotComListerTask, +class IncrementalGitLabDotComLister(GitLabDotComListerTask, IndexingDiscoveryListerTask): task_queue = 'swh_lister_gitlab_discover' -class RangeGitlabLister(GitlabDotComListerTask, IndexingRangeListerTask): +class RangeGitLabLister(GitLabDotComListerTask, IndexingRangeListerTask): task_queue = 'swh_lister_gitlab_refresh' -class FullGitlabRelister(GitlabDotComListerTask, IndexingRefreshListerTask): +class FullGitLabRelister(GitLabDotComListerTask, IndexingRefreshListerTask): task_queue = 'swh_lister_gitlab_refresh'