swh.lister.gitlab: Change uid format
This commit is contained in:
parent
4db15aaf16
commit
cd98af7705
2 changed files with 5 additions and 3 deletions
|
@ -66,10 +66,13 @@ class GitLabLister(PageByPageHttpLister):
|
|||
params['auth'] = (auth['username'], auth['password'])
|
||||
return params
|
||||
|
||||
def uid(self, repo):
|
||||
return '%s/%s' % (self.instance, repo['path_with_namespace'])
|
||||
|
||||
def get_model_from_repo(self, repo):
|
||||
return {
|
||||
'instance': self.instance,
|
||||
'uid': repo['id'],
|
||||
'uid': self.uid(repo),
|
||||
'name': repo['name'],
|
||||
'full_name': repo['path_with_namespace'],
|
||||
'html_url': repo['web_url'],
|
||||
|
|
|
@ -13,8 +13,7 @@ class GitLabModel(ModelBase):
|
|||
"""
|
||||
__tablename__ = 'gitlab_repo'
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
uid = Column(Integer, index=True)
|
||||
uid = Column(String, primary_key=True)
|
||||
instance = Column(String, index=True)
|
||||
|
||||
def __init__(self, uid=None, indexable=None, name=None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue