From af681ac1284ec2ba55d72056f1022d7f58f561d5 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com> Date: Tue, 18 Jun 2019 07:06:48 +0200 Subject: [PATCH] phabricator: model: Reference the forge's instance name in model As phabricator is an "instance" lister (there exists multiple instances of phabricator in the wild), we need to reference that information. In effect, this aligns phabricator lister with for example the gitlab one. Related T1801 Related P434 --- swh/lister/phabricator/lister.py | 3 ++- swh/lister/phabricator/models.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/swh/lister/phabricator/lister.py b/swh/lister/phabricator/lister.py index 7009c106..dd303080 100644 --- a/swh/lister/phabricator/lister.py +++ b/swh/lister/phabricator/lister.py @@ -84,7 +84,8 @@ class PhabricatorLister(SWHIndexingHttpLister): 'html_url': url, 'origin_url': url, 'description': None, - 'origin_type': repo['fields']['vcs'] + 'origin_type': repo['fields']['vcs'], + 'instance': self.instance, } def get_next_target_from_response(self, response): diff --git a/swh/lister/phabricator/models.py b/swh/lister/phabricator/models.py index 533a3655..96cc497a 100644 --- a/swh/lister/phabricator/models.py +++ b/swh/lister/phabricator/models.py @@ -13,3 +13,4 @@ class PhabricatorModel(IndexingModelBase): uid = Column(String, primary_key=True) indexable = Column(Integer, index=True) + instance = Column(String, index=True) -- GitLab