diff --git a/README.md b/README.md index 24ebb04..887b599 100644 --- a/README.md +++ b/README.md @@ -1,180 +1,193 @@ swh-lister ========== This component from the Software Heritage stack aims to produce listings of software origins and their urls hosted on various public developer platforms or package managers. As these operations are quite similar, it provides a set of Python modules abstracting common software origins listing behaviors. It also provides several lister implementations, contained in the following Python modules: - `swh.lister.bitbucket` - `swh.lister.debian` - `swh.lister.github` - `swh.lister.gitlab` - `swh.lister.pypi` - `swh.lister.npm` +- `swh.lister.phabricator` Dependencies ------------ All required dependencies can be found in the `requirements*.txt` files located at the root of the repository. Local deployment ---------------- ## lister configuration Each lister implemented so far by Software Heritage (`github`, `gitlab`, `debian`, `pypi`, `npm`) must be configured by following the instructions below (please note that you have to replace `` by one of the lister name introduced above). ### Preparation steps 1. `mkdir ~/.config/swh/ ~/.cache/swh/lister//` 2. create configuration file `~/.config/swh/lister_.yml` 3. Bootstrap the db instance schema ```lang=bash $ createdb lister- $ python3 -m swh.lister.cli --db-url postgres:///lister- ``` Note: This bootstraps a minimum data set needed for the lister to run. ### Configuration file sample Minimalistic configuration shared by all listers to add in file `~/.config/swh/lister_.yml`: ```lang=yml storage: cls: 'remote' args: url: 'http://localhost:5002/' scheduler: cls: 'remote' args: url: 'http://localhost:5008/' lister: cls: 'local' args: # see http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls db: 'postgresql:///lister-' credentials: [] cache_responses: True cache_dir: /home/user/.cache/swh/lister// ``` Note: This expects storage (5002) and scheduler (5008) services to run locally ## lister-github Once configured, you can execute a GitHub lister using the following instructions in a `python3` script: ```lang=python import logging from swh.lister.github.tasks import range_github_lister logging.basicConfig(level=logging.DEBUG) range_github_lister(364, 365) ... ``` ## lister-gitlab Once configured, you can execute a GitLab lister using the instructions detailed in the `python3` scripts below: ```lang=python import logging from swh.lister.gitlab.tasks import range_gitlab_lister logging.basicConfig(level=logging.DEBUG) range_gitlab_lister(1, 2, { 'instance': 'debian', 'api_baseurl': 'https://salsa.debian.org/api/v4', 'sort': 'asc', 'per_page': 20 }) ``` ```lang=python import logging from swh.lister.gitlab.tasks import full_gitlab_relister logging.basicConfig(level=logging.DEBUG) full_gitlab_relister({ 'instance': '0xacab', 'api_baseurl': 'https://0xacab.org/api/v4', 'sort': 'asc', 'per_page': 20 }) ``` ```lang=python import logging from swh.lister.gitlab.tasks import incremental_gitlab_lister logging.basicConfig(level=logging.DEBUG) incremental_gitlab_lister({ 'instance': 'freedesktop.org', 'api_baseurl': 'https://gitlab.freedesktop.org/api/v4', 'sort': 'asc', 'per_page': 20 }) ``` ## lister-debian Once configured, you can execute a Debian lister using the following instructions in a `python3` script: ```lang=python import logging from swh.lister.debian.tasks import debian_lister logging.basicConfig(level=logging.DEBUG) debian_lister('Debian') ``` ## lister-pypi Once configured, you can execute a PyPI lister using the following instructions in a `python3` script: ```lang=python import logging from swh.lister.pypi.tasks import pypi_lister logging.basicConfig(level=logging.DEBUG) pypi_lister() ``` ## lister-npm Once configured, you can execute a npm lister using the following instructions in a `python3` REPL: ```lang=python import logging from swh.lister.npm.tasks import npm_lister logging.basicConfig(level=logging.DEBUG) npm_lister() ``` +## lister-phabricator + +Once configured, you can execute a Phabricator lister using the following instructions in a `python3` script: + +```lang=python +import logging +from swh.lister.phabricator.tasks import incremental_phabricator_lister + +logging.basicConfig(level=logging.DEBUG) +incremental_phabricator_lister(forge_url='https://forge.softwareheritage.org', api_token='XXXX') +``` + Licensing --------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. See top-level LICENSE file for the full text of the GNU General Public License along with this program. \ No newline at end of file diff --git a/swh/lister/cli.py b/swh/lister/cli.py index 8809025..ac2688f 100644 --- a/swh/lister/cli.py +++ b/swh/lister/cli.py @@ -1,121 +1,130 @@ # Copyright (C) 2018 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information import logging import click logger = logging.getLogger(__name__) -SUPPORTED_LISTERS = ['github', 'gitlab', 'bitbucket', 'debian', 'pypi', 'npm'] +SUPPORTED_LISTERS = ['github', 'gitlab', 'bitbucket', 'debian', 'pypi', + 'npm', 'phabricator'] @click.command() @click.option( '--db-url', '-d', default='postgres:///lister-gitlab.com', help='SQLAlchemy DB URL; see ' '') # noqa @click.argument('listers', required=1, nargs=-1, type=click.Choice(SUPPORTED_LISTERS + ['all'])) @click.option('--drop-tables', '-D', is_flag=True, default=False, help='Drop tables before creating the database schema') def cli(db_url, listers, drop_tables): """Initialize db model according to lister. """ override_conf = { 'lister': { 'cls': 'local', 'args': {'db': db_url} } } if 'all' in listers: listers = SUPPORTED_LISTERS for lister in listers: logger.info('Initializing lister %s', lister) insert_minimum_data = None if lister == 'github': from .github.models import IndexingModelBase as ModelBase from .github.lister import GitHubLister _lister = GitHubLister( api_baseurl='https://api.github.com', override_config=override_conf) elif lister == 'bitbucket': from .bitbucket.models import IndexingModelBase as ModelBase from .bitbucket.lister import BitBucketLister _lister = BitBucketLister( api_baseurl='https://api.bitbucket.org/2.0', override_config=override_conf) elif lister == 'gitlab': from .gitlab.models import ModelBase from .gitlab.lister import GitLabLister _lister = GitLabLister( api_baseurl='https://gitlab.com/api/v4/', override_config=override_conf) elif lister == 'debian': from .debian.lister import DebianLister ModelBase = DebianLister.MODEL # noqa _lister = DebianLister(override_config=override_conf) def insert_minimum_data(lister): from swh.storage.schemata.distribution import ( Distribution, Area) d = Distribution( name='Debian', type='deb', mirror_uri='http://deb.debian.org/debian/') lister.db_session.add(d) areas = [] for distribution_name in ['stretch']: for area_name in ['main', 'contrib', 'non-free']: areas.append(Area( name='%s/%s' % (distribution_name, area_name), distribution=d, )) lister.db_session.add_all(areas) lister.db_session.commit() elif lister == 'pypi': from .pypi.models import ModelBase from .pypi.lister import PyPILister _lister = PyPILister(override_config=override_conf) elif lister == 'npm': from .npm.models import IndexingModelBase as ModelBase from .npm.models import NpmVisitModel from .npm.lister import NpmLister _lister = NpmLister(override_config=override_conf) if drop_tables: NpmVisitModel.metadata.drop_all(_lister.db_engine) NpmVisitModel.metadata.create_all(_lister.db_engine) + elif lister == 'phabricator': + from .phabricator.models import IndexingModelBase as ModelBase + from .phabricator.lister import PhabricatorLister + _lister = PhabricatorLister( + forge_url='https://forge.softwareheritage.org', + api_token='', + override_config=override_conf) + else: raise ValueError( 'Invalid lister %s: only supported listers are %s' % (lister, SUPPORTED_LISTERS)) if drop_tables: logger.info('Dropping tables for %s', lister) ModelBase.metadata.drop_all(_lister.db_engine) logger.info('Creating tables for %s', lister) ModelBase.metadata.create_all(_lister.db_engine) if insert_minimum_data: logger.info('Inserting minimal data for %s', lister) try: insert_minimum_data(_lister) except Exception: logger.warning( 'Failed to insert minimum data in %s', lister) if __name__ == '__main__': cli() diff --git a/swh/lister/core/tests/conftest.py b/swh/lister/core/tests/conftest.py index bdbfa02..17ce8f2 100644 --- a/swh/lister/core/tests/conftest.py +++ b/swh/lister/core/tests/conftest.py @@ -1,14 +1,15 @@ import pytest from swh.scheduler.tests.conftest import * # noqa @pytest.fixture(scope='session') def celery_includes(): return [ 'swh.lister.bitbucket.tasks', 'swh.lister.debian.tasks', 'swh.lister.github.tasks', 'swh.lister.gitlab.tasks', 'swh.lister.npm.tasks', 'swh.lister.pypi.tasks', + 'swh.lister.phabricator.tasks', ] diff --git a/swh/lister/phabricator/__init__.py b/swh/lister/phabricator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/swh/lister/phabricator/lister.py b/swh/lister/phabricator/lister.py new file mode 100644 index 0000000..dfb77e3 --- /dev/null +++ b/swh/lister/phabricator/lister.py @@ -0,0 +1,138 @@ +# Copyright (C) 2019 the Software Heritage developers +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + + +from swh.lister.core.indexing_lister import SWHIndexingHttpLister +from swh.lister.phabricator.models import PhabricatorModel +from collections import defaultdict + + +class PhabricatorLister(SWHIndexingHttpLister): + + PATH_TEMPLATE = '&order=oldest&attachments[uris]=1&after=%s' + MODEL = PhabricatorModel + LISTER_NAME = 'phabricator' + + def __init__(self, forge_url, api_token, override_config=None): + if forge_url.endswith("/"): + forge_url = forge_url[:-1] + self.forge_url = forge_url + api_endpoint = ('api/diffusion.repository.' + 'search?api.token=%s') % api_token + api_baseurl = '%s/%s' % (forge_url, api_endpoint) + super().__init__(api_baseurl=api_baseurl, + override_config=override_config) + + def request_headers(self): + """ + (Override) Set requests headers to send when querying the + Phabricator API + """ + return {'User-Agent': 'Software Heritage phabricator lister', + 'Accept': 'application/json'} + + def get_model_from_repo(self, repo): + url = get_repo_url(repo['attachments']['uris']['uris']) + if url is None: + return None + return { + 'uid': self.forge_url + str(repo['id']), + 'indexable': repo['id'], + 'name': repo['fields']['shortName'], + 'full_name': repo['fields']['name'], + 'html_url': url, + 'origin_url': url, + 'description': None, + 'origin_type': repo['fields']['vcs'] + } + + def get_next_target_from_response(self, response): + body = response.json()['result']['cursor'] + if body['after'] != 'null': + return body['after'] + else: + return None + + def transport_response_simplified(self, response): + repos = response.json() + if repos['result'] is None: + raise ValueError( + 'Problem during information fetch: %s' % repos['error_code']) + repos = repos['result']['data'] + return [self.get_model_from_repo(repo) for repo in repos] + + def filter_before_inject(self, models_list): + """ + (Overrides) SWHIndexingLister.filter_before_inject + Bounds query results by this Lister's set max_index. + """ + models_list = [m for m in models_list if m is not None] + return super().filter_before_inject(models_list) + + def _bootstrap_repositories_listing(self): + """ + Method called when no min_bound value has been provided + to the lister. Its purpose is to: + + 1. get the first repository data hosted on the Phabricator + instance + + 2. inject them into the lister database + + 3. return the first repository index to start the listing + after that value + + Returns: + int: The first repository index + """ + params = '&order=oldest&limit=1' + response = self.safely_issue_request(params) + models_list = self.transport_response_simplified(response) + self.max_index = models_list[0]['indexable'] + models_list = self.filter_before_inject(models_list) + injected = self.inject_repo_data_into_db(models_list) + self.create_missing_origins_and_tasks(models_list, injected) + return self.max_index + + def run(self, min_bound=None, max_bound=None): + """ + (Override) Run the lister on the specified Phabricator instance + + Args: + min_bound (int): Optional repository index to start the listing + after it + max_bound (int): Optional repository index to stop the listing + after it + """ + # initial call to the lister, we need to bootstrap it in that case + if min_bound is None: + min_bound = self._bootstrap_repositories_listing() + super().run(min_bound, max_bound) + + +def get_repo_url(attachments): + """ + Return url for a hosted repository from its uris attachments according + to the following priority lists: + * protocol: https > http + * identifier: shortname > callsign > id + """ + processed_urls = defaultdict(dict) + for uri in attachments: + protocol = uri['fields']['builtin']['protocol'] + url = uri['fields']['uri']['effective'] + identifier = uri['fields']['builtin']['identifier'] + if protocol in ('http', 'https'): + processed_urls[protocol][identifier] = url + elif protocol is None: + for protocol in ('https', 'http'): + if url.startswith(protocol): + processed_urls[protocol]['undefined'] = url + break + for protocol in ['https', 'http']: + for identifier in ['shortname', 'callsign', 'id', 'undefined']: + if (protocol in processed_urls and + identifier in processed_urls[protocol]): + return processed_urls[protocol][identifier] + return None diff --git a/swh/lister/phabricator/models.py b/swh/lister/phabricator/models.py new file mode 100644 index 0000000..ba7ee73 --- /dev/null +++ b/swh/lister/phabricator/models.py @@ -0,0 +1,15 @@ +# Copyright (C) 2019 the Software Heritage developers +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + +from sqlalchemy import Column, String, Integer + +from swh.lister.core.models import IndexingModelBase + + +class PhabricatorModel(IndexingModelBase): + """a Phabricator repository""" + __tablename__ = 'phabricator_repos' + + uid = Column(String, primary_key=True) + indexable = Column(Integer, index=True) diff --git a/swh/lister/phabricator/tasks.py b/swh/lister/phabricator/tasks.py new file mode 100644 index 0000000..83ecd67 --- /dev/null +++ b/swh/lister/phabricator/tasks.py @@ -0,0 +1,28 @@ +# Copyright (C) 2019 the Software Heritage developers +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + +from swh.scheduler.celery_backend.config import app +from swh.lister.phabricator.lister import PhabricatorLister + + +def new_lister( + forge_url='https://forge.softwareheritage.org', api_token='', **kw): + return PhabricatorLister(forge_url=forge_url, api_token=api_token, **kw) + + +@app.task(name=__name__ + '.IncrementalPhabricatorLister') +def incremental_phabricator_lister(**lister_args): + lister = new_lister(**lister_args) + lister.run(min_bound=lister.db_last_index()) + + +@app.task(name=__name__ + '.FullPhabricatorLister') +def full_phabricator_lister(**lister_args): + lister = new_lister(**lister_args) + lister.run() + + +@app.task(name=__name__ + '.ping') +def ping(): + return 'OK' diff --git a/swh/lister/phabricator/tests/__init__.py b/swh/lister/phabricator/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/swh/lister/phabricator/tests/api_empty_response.json b/swh/lister/phabricator/tests/api_empty_response.json new file mode 100644 index 0000000..ea459bf --- /dev/null +++ b/swh/lister/phabricator/tests/api_empty_response.json @@ -0,0 +1,8 @@ +{ + "result": { + "data": [], + "cursor": { + "after": null + } + } +} diff --git a/swh/lister/phabricator/tests/api_response.json b/swh/lister/phabricator/tests/api_response.json new file mode 100644 index 0000000..df86db4 --- /dev/null +++ b/swh/lister/phabricator/tests/api_response.json @@ -0,0 +1,2538 @@ +{ + "result": { + "data": [ + { + "id": 3, + "type": "REPO", + "phid": "PHID-REPO-cjukcpw6hvovij27fq26", + "fields": { + "name": "Puppet Environment", + "vcs": "git", + "callsign": "SENV", + "shortName": "puppet-environment", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877163, + "dateModified": 1519668896, + "policy": { + "view": "public", + "edit": "PHID-PROJ-w6dmg2vssgiimpjpduga", + "diffusion.push": "PHID-PROJ-w6dmg2vssgiimpjpduga" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "819", + "type": "RURI", + "phid": "PHID-RURI-zwot2up6krkp3jcovcae", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "git@github.com:SoftwareHeritage/puppet-environment.git", + "display": "git@github.com:SoftwareHeritage/puppet-environment.git", + "effective": "git@github.com:SoftwareHeritage/puppet-environment.git", + "normalized": "github.com/SoftwareHeritage/puppet-environment" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486571136", + "dateModified": "1486571136" + } + }, + { + "id": "6", + "type": "RURI", + "phid": "PHID-RURI-keaejv5qus3jmx2abpj5", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/3/puppet-environment.git", + "effective": "https://forge.softwareheritage.org/diffusion/3/puppet-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/3" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "5", + "type": "RURI", + "phid": "PHID-RURI-qiudbgz27drv4mkesmvj", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/puppet-environment.git", + "effective": "https://forge.softwareheritage.org/source/puppet-environment.git", + "normalized": "forge.softwareheritage.org/source/puppet-environment" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "4", + "type": "RURI", + "phid": "PHID-RURI-zetkryxi2ibq66yl3pb5", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/SENV/puppet-environment.git", + "effective": "https://forge.softwareheritage.org/diffusion/SENV/puppet-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/SENV" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "3", + "type": "RURI", + "phid": "PHID-RURI-yzg3kzoqfbh4zd5buvij", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/3/puppet-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/3/puppet-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/3" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "2", + "type": "RURI", + "phid": "PHID-RURI-2gvaroqipsieeje5z3sc", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/puppet-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/source/puppet-environment.git", + "normalized": "forge.softwareheritage.org/source/puppet-environment" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "1", + "type": "RURI", + "phid": "PHID-RURI-ro4bvq6y4kzcj66hcaym", + "fields": { + "repositoryPHID": "PHID-REPO-cjukcpw6hvovij27fq26", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/SENV/puppet-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/SENV/puppet-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/SENV" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 4, + "type": "REPO", + "phid": "PHID-REPO-qlaiewlsf3plx563upbk", + "fields": { + "name": "Git cloner", + "vcs": "git", + "callsign": "DCLG", + "shortName": "swh-cloner-git", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877362, + "dateModified": 1497281975, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "no-one" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "15", + "type": "RURI", + "phid": "PHID-RURI-77knwcyarzlxm7scz26b", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/4/swh-cloner-git.git", + "effective": "https://forge.softwareheritage.org/diffusion/4/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/diffusion/4" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "14", + "type": "RURI", + "phid": "PHID-RURI-kt6nsyous73u7zifz4q3", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-cloner-git.git", + "effective": "https://forge.softwareheritage.org/source/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/source/swh-cloner-git" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "13", + "type": "RURI", + "phid": "PHID-RURI-nqw5ydn7f2iweydcpx4j", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DCLG/swh-cloner-git.git", + "effective": "https://forge.softwareheritage.org/diffusion/DCLG/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/diffusion/DCLG" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "12", + "type": "RURI", + "phid": "PHID-RURI-m4dywkvx3rgqqognyifk", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/4/swh-cloner-git.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/4/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/diffusion/4" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "11", + "type": "RURI", + "phid": "PHID-RURI-nyty74ac2wwbm2pa43xi", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-cloner-git.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/source/swh-cloner-git" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "10", + "type": "RURI", + "phid": "PHID-RURI-jycms67trm5d7cnw2yus", + "fields": { + "repositoryPHID": "PHID-REPO-qlaiewlsf3plx563upbk", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DCLG/swh-cloner-git.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DCLG/swh-cloner-git.git", + "normalized": "forge.softwareheritage.org/diffusion/DCLG" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 5, + "type": "REPO", + "phid": "PHID-REPO-rwxybwflua3hdbvuefxn", + "fields": { + "name": "Foundations and core functionalities", + "vcs": "git", + "callsign": "DCORE", + "shortName": "swh-core", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877840, + "dateModified": 1543276355, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "users" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "682", + "type": "RURI", + "phid": "PHID-RURI-qk67i7b7zx25q4ziyd7v", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-core.git", + "display": "git@github.com:SoftwareHeritage/swh-core.git", + "effective": "git@github.com:SoftwareHeritage/swh-core.git", + "normalized": "github.com/SoftwareHeritage/swh-core" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1474544586", + "dateModified": "1519746825" + } + }, + { + "id": "24", + "type": "RURI", + "phid": "PHID-RURI-p3v5va73gn262dokrtqk", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/5/swh-core.git", + "effective": "https://forge.softwareheritage.org/diffusion/5/swh-core.git", + "normalized": "forge.softwareheritage.org/diffusion/5" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "23", + "type": "RURI", + "phid": "PHID-RURI-rqmdebjngj7sm5smdx5v", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-core.git", + "effective": "https://forge.softwareheritage.org/source/swh-core.git", + "normalized": "forge.softwareheritage.org/source/swh-core" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "22", + "type": "RURI", + "phid": "PHID-RURI-u3qrap3qfq4h56lxpycr", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DCORE/swh-core.git", + "effective": "https://forge.softwareheritage.org/diffusion/DCORE/swh-core.git", + "normalized": "forge.softwareheritage.org/diffusion/DCORE" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "21", + "type": "RURI", + "phid": "PHID-RURI-b3cedaogb477uumj4dbw", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/5/swh-core.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/5/swh-core.git", + "normalized": "forge.softwareheritage.org/diffusion/5" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "20", + "type": "RURI", + "phid": "PHID-RURI-ohkxvptjxmvjrcllvqx6", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-core.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-core.git", + "normalized": "forge.softwareheritage.org/source/swh-core" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "19", + "type": "RURI", + "phid": "PHID-RURI-rbsryj7opmgiruolvwtt", + "fields": { + "repositoryPHID": "PHID-REPO-rwxybwflua3hdbvuefxn", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DCORE/swh-core.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DCORE/swh-core.git", + "normalized": "forge.softwareheritage.org/diffusion/DCORE" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 6, + "type": "REPO", + "phid": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "fields": { + "name": "Development environment", + "vcs": "git", + "callsign": "DENV", + "shortName": "swh-environment", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877840, + "dateModified": 1486563625, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "PHID-PROJ-zqzomfxtpkd5jgltioiy" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "805", + "type": "RURI", + "phid": "PHID-RURI-yyh5h5zf6tz7t4irmkdn", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-environment.git", + "display": "git@github.com:SoftwareHeritage/swh-environment.git", + "effective": "git@github.com:SoftwareHeritage/swh-environment.git", + "normalized": "github.com/SoftwareHeritage/swh-environment" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486563625", + "dateModified": "1486563625" + } + }, + { + "id": "33", + "type": "RURI", + "phid": "PHID-RURI-554w3bgme6f2w4ucy6hg", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/6/swh-environment.git", + "effective": "https://forge.softwareheritage.org/diffusion/6/swh-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/6" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "32", + "type": "RURI", + "phid": "PHID-RURI-w7rukym3vek35buik6pj", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-environment.git", + "effective": "https://forge.softwareheritage.org/source/swh-environment.git", + "normalized": "forge.softwareheritage.org/source/swh-environment" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "31", + "type": "RURI", + "phid": "PHID-RURI-tburtpmgzfiffppz25gl", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DENV/swh-environment.git", + "effective": "https://forge.softwareheritage.org/diffusion/DENV/swh-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/DENV" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "30", + "type": "RURI", + "phid": "PHID-RURI-5mmjtixnhlhjg3fnxm4i", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/6/swh-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/6/swh-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/6" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "29", + "type": "RURI", + "phid": "PHID-RURI-hbf6gm4izewpmxckgn5h", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-environment.git", + "normalized": "forge.softwareheritage.org/source/swh-environment" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "28", + "type": "RURI", + "phid": "PHID-RURI-vgawokhxonab42if7dhm", + "fields": { + "repositoryPHID": "PHID-REPO-ehgm4jpvhhzxycwucv7j", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DENV/swh-environment.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DENV/swh-environment.git", + "normalized": "forge.softwareheritage.org/diffusion/DENV" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 7, + "type": "REPO", + "phid": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "fields": { + "name": "Debian package loader", + "vcs": "git", + "callsign": "DLDDEB", + "shortName": "swh-loader-debian", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877840, + "dateModified": 1547058787, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "users" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "808", + "type": "RURI", + "phid": "PHID-RURI-7dew7hh2u6rczzrudbw7", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-loader-debian.git", + "display": "git@github.com:SoftwareHeritage/swh-loader-debian.git", + "effective": "git@github.com:SoftwareHeritage/swh-loader-debian.git", + "normalized": "github.com/SoftwareHeritage/swh-loader-debian" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486571106", + "dateModified": "1486571106" + } + }, + { + "id": "42", + "type": "RURI", + "phid": "PHID-RURI-2t2qxl4xiqz76vutaqbt", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/7/swh-loader-debian.git", + "effective": "https://forge.softwareheritage.org/diffusion/7/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/diffusion/7" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "41", + "type": "RURI", + "phid": "PHID-RURI-dps3pzf6das2p2pczdao", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-loader-debian.git", + "effective": "https://forge.softwareheritage.org/source/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/source/swh-loader-debian" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "40", + "type": "RURI", + "phid": "PHID-RURI-qk277eakpfsud7homi7x", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DLDDEB/swh-loader-debian.git", + "effective": "https://forge.softwareheritage.org/diffusion/DLDDEB/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDDEB" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "39", + "type": "RURI", + "phid": "PHID-RURI-m2iwa2thft7t2bu6pvnu", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/7/swh-loader-debian.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/7/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/diffusion/7" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "38", + "type": "RURI", + "phid": "PHID-RURI-ibp7sepp5krmrz2zb7on", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-loader-debian.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/source/swh-loader-debian" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "37", + "type": "RURI", + "phid": "PHID-RURI-xdda3g7vcxwny5styzga", + "fields": { + "repositoryPHID": "PHID-REPO-gkyta7fyiybtuqd4sg2x", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DLDDEB/swh-loader-debian.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DLDDEB/swh-loader-debian.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDDEB" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 8, + "type": "REPO", + "phid": "PHID-REPO-6yxfwkp54snt37kjzv56", + "fields": { + "name": "Git loader", + "vcs": "git", + "callsign": "DLDG", + "shortName": "swh-loader-git", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877841, + "dateModified": 1547058608, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "users" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "810", + "type": "RURI", + "phid": "PHID-RURI-m757ey5cjtqoswnp4jfn", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-loader-git.git", + "display": "git@github.com:SoftwareHeritage/swh-loader-git.git", + "effective": "git@github.com:SoftwareHeritage/swh-loader-git.git", + "normalized": "github.com/SoftwareHeritage/swh-loader-git" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486571111", + "dateModified": "1486571111" + } + }, + { + "id": "51", + "type": "RURI", + "phid": "PHID-RURI-caomlqx42p6ndbd4dwwy", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/8/swh-loader-git.git", + "effective": "https://forge.softwareheritage.org/diffusion/8/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/diffusion/8" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "50", + "type": "RURI", + "phid": "PHID-RURI-opinwxwlqq5w2nzy4c4z", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-loader-git.git", + "effective": "https://forge.softwareheritage.org/source/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/source/swh-loader-git" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "49", + "type": "RURI", + "phid": "PHID-RURI-nnlls52bb2nif7dtsvuc", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DLDG/swh-loader-git.git", + "effective": "https://forge.softwareheritage.org/diffusion/DLDG/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDG" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "48", + "type": "RURI", + "phid": "PHID-RURI-acwrxzvkjzd4ulsfz6er", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/8/swh-loader-git.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/8/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/diffusion/8" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "47", + "type": "RURI", + "phid": "PHID-RURI-mwsdfswyruannmalcdgl", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-loader-git.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/source/swh-loader-git" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "46", + "type": "RURI", + "phid": "PHID-RURI-3mp7uo2nsawcb3b2uteq", + "fields": { + "repositoryPHID": "PHID-REPO-6yxfwkp54snt37kjzv56", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DLDG/swh-loader-git.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DLDG/swh-loader-git.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDG" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 9, + "type": "REPO", + "phid": "PHID-REPO-b2cdo5agfixco2mqreuy", + "fields": { + "name": "Git loader - test data", + "vcs": "git", + "callsign": "DLDGT", + "shortName": "git-loader-test-data", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877841, + "dateModified": 1519745125, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "PHID-PROJ-zqzomfxtpkd5jgltioiy" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "811", + "type": "RURI", + "phid": "PHID-RURI-uhpi5u226sqfmwcpzpsa", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "git@github.com:SoftwareHeritage/git-loader-test-data.git", + "display": "git@github.com:SoftwareHeritage/git-loader-test-data.git", + "effective": "git@github.com:SoftwareHeritage/git-loader-test-data.git", + "normalized": "github.com/SoftwareHeritage/git-loader-test-data" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486571113", + "dateModified": "1486571113" + } + }, + { + "id": "60", + "type": "RURI", + "phid": "PHID-RURI-76btknuireumkts2qqcn", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/9/git-loader-test-data.git", + "effective": "https://forge.softwareheritage.org/diffusion/9/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/diffusion/9" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "59", + "type": "RURI", + "phid": "PHID-RURI-qiudxih5pqk46btodq52", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/git-loader-test-data.git", + "effective": "https://forge.softwareheritage.org/source/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/source/git-loader-test-data" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "58", + "type": "RURI", + "phid": "PHID-RURI-ge4uegurx2y4f7bivvvs", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DLDGT/git-loader-test-data.git", + "effective": "https://forge.softwareheritage.org/diffusion/DLDGT/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDGT" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "57", + "type": "RURI", + "phid": "PHID-RURI-hykqfusjkkosx46alejf", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/9/git-loader-test-data.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/9/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/diffusion/9" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "56", + "type": "RURI", + "phid": "PHID-RURI-smauekehnvde7rdhrvon", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/git-loader-test-data.git", + "effective": "ssh://git@forge.softwareheritage.org/source/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/source/git-loader-test-data" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "55", + "type": "RURI", + "phid": "PHID-RURI-ma6mpnw3e4hni6hcru4w", + "fields": { + "repositoryPHID": "PHID-REPO-b2cdo5agfixco2mqreuy", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DLDGT/git-loader-test-data.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DLDGT/git-loader-test-data.git", + "normalized": "forge.softwareheritage.org/diffusion/DLDGT" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 10, + "type": "REPO", + "phid": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "fields": { + "name": "CGit lister", + "vcs": "git", + "callsign": "DLSCG", + "shortName": "swh-lister-cgit", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877841, + "dateModified": 1486571119, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "PHID-PROJ-zqzomfxtpkd5jgltioiy" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "813", + "type": "RURI", + "phid": "PHID-RURI-5voo6vvnvdd72k4anjob", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-lister-cgit.git", + "display": "git@github.com:SoftwareHeritage/swh-lister-cgit.git", + "effective": "git@github.com:SoftwareHeritage/swh-lister-cgit.git", + "normalized": "github.com/SoftwareHeritage/swh-lister-cgit" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486571119", + "dateModified": "1486571119" + } + }, + { + "id": "69", + "type": "RURI", + "phid": "PHID-RURI-q6pr6zzemgn64iv5h4mz", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/10/swh-lister-cgit.git", + "effective": "https://forge.softwareheritage.org/diffusion/10/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/diffusion/10" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "68", + "type": "RURI", + "phid": "PHID-RURI-dchphkf7afnsz6o3d6s7", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-lister-cgit.git", + "effective": "https://forge.softwareheritage.org/source/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/source/swh-lister-cgit" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "67", + "type": "RURI", + "phid": "PHID-RURI-oemnx7vueo7av5ergwhg", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DLSCG/swh-lister-cgit.git", + "effective": "https://forge.softwareheritage.org/diffusion/DLSCG/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/diffusion/DLSCG" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "66", + "type": "RURI", + "phid": "PHID-RURI-ffucdrzfyqtwr2gpno37", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/10/swh-lister-cgit.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/10/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/diffusion/10" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "65", + "type": "RURI", + "phid": "PHID-RURI-vskwaaeuxrc2nanreaj3", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-lister-cgit.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/source/swh-lister-cgit" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "64", + "type": "RURI", + "phid": "PHID-RURI-bl27gg5whneoxiytxmaj", + "fields": { + "repositoryPHID": "PHID-REPO-4ocen5dkqx4i5pe34knp", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DLSCG/swh-lister-cgit.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DLSCG/swh-lister-cgit.git", + "normalized": "forge.softwareheritage.org/diffusion/DLSCG" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 11, + "type": "REPO", + "phid": "PHID-REPO-lthllz32wb4x72kkdcs3", + "fields": { + "name": "Listers", + "vcs": "git", + "callsign": "DLS", + "shortName": "swh-lister", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877841, + "dateModified": 1547058690, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "users" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "846", + "type": "RURI", + "phid": "PHID-RURI-42rboz7opl2zz2hjvy6m", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-lister.git", + "display": "git@github.com:SoftwareHeritage/swh-lister.git", + "effective": "git@github.com:SoftwareHeritage/swh-lister.git", + "normalized": "github.com/SoftwareHeritage/swh-lister" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486652955", + "dateModified": "1492792215" + } + }, + { + "id": "845", + "type": "RURI", + "phid": "PHID-RURI-ezu77cg7xd47beaqklnh", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-lister-github.git", + "display": "git@github.com:SoftwareHeritage/swh-lister-github.git", + "effective": "git@github.com:SoftwareHeritage/swh-lister-github.git", + "normalized": "github.com/SoftwareHeritage/swh-lister-github" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": true, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1486652889", + "dateModified": "1492792358" + } + }, + { + "id": "78", + "type": "RURI", + "phid": "PHID-RURI-b5uflskla4letdsvbnjv", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/11/swh-lister.git", + "effective": "https://forge.softwareheritage.org/diffusion/11/swh-lister.git", + "normalized": "forge.softwareheritage.org/diffusion/11" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "77", + "type": "RURI", + "phid": "PHID-RURI-tkpmxuj27b757c2gbnmb", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-lister.git", + "effective": "https://forge.softwareheritage.org/source/swh-lister.git", + "normalized": "forge.softwareheritage.org/source/swh-lister" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "76", + "type": "RURI", + "phid": "PHID-RURI-f6dcl6mnnd7oi5rdxw26", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "https://callsign", + "display": "https://forge.softwareheritage.org/diffusion/DLS/swh-lister.git", + "effective": "https://forge.softwareheritage.org/diffusion/DLS/swh-lister.git", + "normalized": "forge.softwareheritage.org/diffusion/DLS" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "75", + "type": "RURI", + "phid": "PHID-RURI-dqcif6i64qt3yiyuztmf", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/11/swh-lister.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/11/swh-lister.git", + "normalized": "forge.softwareheritage.org/diffusion/11" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "74", + "type": "RURI", + "phid": "PHID-RURI-j63yjozb5zd3zqrmuv4q", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-lister.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-lister.git", + "normalized": "forge.softwareheritage.org/source/swh-lister" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "73", + "type": "RURI", + "phid": "PHID-RURI-dnad7c6pfowgxlfua6gy", + "fields": { + "repositoryPHID": "PHID-REPO-lthllz32wb4x72kkdcs3", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DLS/swh-lister.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DLS/swh-lister.git", + "normalized": "forge.softwareheritage.org/diffusion/DLS" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + }, + { + "id": 12, + "type": "REPO", + "phid": "PHID-REPO-kasovubyed5uxxpadvs3", + "fields": { + "name": "Storage manager", + "vcs": "git", + "callsign": "DSTO", + "shortName": "swh-storage", + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1441877842, + "dateModified": 1549623462, + "policy": { + "view": "public", + "edit": "PHID-PROJ-zqzomfxtpkd5jgltioiy", + "diffusion.push": "users" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "683", + "type": "RURI", + "phid": "PHID-RURI-4rjkye2jxnp7lgnqmsoa", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "git@github.com:SoftwareHeritage/swh-storage.git", + "display": "git@github.com:SoftwareHeritage/swh-storage.git", + "effective": "git@github.com:SoftwareHeritage/swh-storage.git", + "normalized": "github.com/SoftwareHeritage/swh-storage" + }, + "io": { + "raw": "mirror", + "default": "none", + "effective": "mirror" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "PHID-CDTL-hwgnkw6vk2nrh475bvkf", + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1474643061", + "dateModified": "1519746814" + } + }, + { + "id": "87", + "type": "RURI", + "phid": "PHID-RURI-npie2vfeegszyxgmaee5", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "https://id", + "display": "https://forge.softwareheritage.org/diffusion/12/swh-storage.git", + "effective": "https://forge.softwareheritage.org/diffusion/12/swh-storage.git", + "normalized": "forge.softwareheritage.org/diffusion/12" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "86", + "type": "RURI", + "phid": "PHID-RURI-7dxwck2ab6dedc7kkyay", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "https://shortname", + "display": "https://forge.softwareheritage.org/source/swh-storage.git", + "effective": "https://forge.softwareheritage.org/source/swh-storage.git", + "normalized": "forge.softwareheritage.org/source/swh-storage" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "85", + "type": "RURI", + "phid": "PHID-RURI-kgiwcdlqfjlg6tbas4xq", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "git@github.com:SoftwareHeritage/mirror-tryout.git", + "display": "https://forge.softwareheritage.org/diffusion/DSTO/swh-storage.git", + "effective": "https://forge.softwareheritage.org/diffusion/DSTO/swh-storage.git", + "normalized": "forge.softwareheritage.org/diffusion/DSTO" + }, + "io": { + "raw": "read", + "default": "readwrite", + "effective": "read" + }, + "display": { + "raw": "never", + "default": "never", + "effective": "never" + }, + "credentialPHID": "", + "disabled": false, + "builtin": { + "protocol": "https", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1485783470" + } + }, + { + "id": "84", + "type": "RURI", + "phid": "PHID-RURI-n5qnymw6y7os3quhonmt", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "ssh://id", + "display": "ssh://git@forge.softwareheritage.org/diffusion/12/swh-storage.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/12/swh-storage.git", + "normalized": "forge.softwareheritage.org/diffusion/12" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "id" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "83", + "type": "RURI", + "phid": "PHID-RURI-nnaxsbmjekmw6lcd2qfz", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "ssh://shortname", + "display": "ssh://git@forge.softwareheritage.org/source/swh-storage.git", + "effective": "ssh://git@forge.softwareheritage.org/source/swh-storage.git", + "normalized": "forge.softwareheritage.org/source/swh-storage" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "always", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "shortname" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + }, + { + "id": "82", + "type": "RURI", + "phid": "PHID-RURI-zgmgow3nmbn6nv2j7lzt", + "fields": { + "repositoryPHID": "PHID-REPO-kasovubyed5uxxpadvs3", + "uri": { + "raw": "ssh://callsign", + "display": "ssh://git@forge.softwareheritage.org/diffusion/DSTO/swh-storage.git", + "effective": "ssh://git@forge.softwareheritage.org/diffusion/DSTO/swh-storage.git", + "normalized": "forge.softwareheritage.org/diffusion/DSTO" + }, + "io": { + "raw": "default", + "default": "readwrite", + "effective": "readwrite" + }, + "display": { + "raw": "default", + "default": "never", + "effective": "never" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": "ssh", + "identifier": "callsign" + }, + "dateCreated": "1465923366", + "dateModified": "1465923366" + } + } + ] + } + } + } + ], + "maps": {}, + "query": { + "queryKey": null + }, + "cursor": { + "limit": 10, + "after": "12", + "before": null, + "order": "oldest" + } + }, + "error_code": null, + "error_info": null +} \ No newline at end of file diff --git a/swh/lister/phabricator/tests/api_response_undefined_protocol.json b/swh/lister/phabricator/tests/api_response_undefined_protocol.json new file mode 100644 index 0000000..df7ade7 --- /dev/null +++ b/swh/lister/phabricator/tests/api_response_undefined_protocol.json @@ -0,0 +1,60 @@ +{ + "id": 8, + "type": "REPO", + "phid": "PHID-REPO-ge2icigfu5ijk2whqfbl", + "fields": { + "name": "Blender Libraries", + "vcs": "svn", + "callsign": "BL", + "shortName": null, + "status": "active", + "isImporting": false, + "almanacServicePHID": null, + "spacePHID": null, + "dateCreated": 1385564674, + "dateModified": 1468574079, + "policy": { + "view": "public", + "edit": "admin", + "diffusion.push": "PHID-PROJ-hclk7tvd6pmpjmqastjl" + } + }, + "attachments": { + "uris": { + "uris": [ + { + "id": "70", + "type": "RURI", + "phid": "PHID-RURI-h7zdbkud6why4xrb2s2e", + "fields": { + "repositoryPHID": "PHID-REPO-ge2icigfu5ijk2whqfbl", + "uri": { + "raw": "https://svn.blender.org/svnroot/bf-blender/", + "display": "https://svn.blender.org/svnroot/bf-blender/", + "effective": "https://svn.blender.org/svnroot/bf-blender/", + "normalized": "svn.blender.org/svnroot/bf-blender" + }, + "io": { + "raw": "observe", + "default": "none", + "effective": "observe" + }, + "display": { + "raw": "always", + "default": "never", + "effective": "always" + }, + "credentialPHID": null, + "disabled": false, + "builtin": { + "protocol": null, + "identifier": null + }, + "dateCreated": "1467894515", + "dateModified": "1468574079" + } + } + ] + } + } +} \ No newline at end of file diff --git a/swh/lister/phabricator/tests/conftest.py b/swh/lister/phabricator/tests/conftest.py new file mode 100644 index 0000000..507fef9 --- /dev/null +++ b/swh/lister/phabricator/tests/conftest.py @@ -0,0 +1 @@ +from swh.lister.core.tests.conftest import * # noqa diff --git a/swh/lister/phabricator/tests/test_lister.py b/swh/lister/phabricator/tests/test_lister.py new file mode 100644 index 0000000..29fbcec --- /dev/null +++ b/swh/lister/phabricator/tests/test_lister.py @@ -0,0 +1,53 @@ +# Copyright (C) 2019 the Software Heritage developers +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + +import re +import json +import unittest +from swh.lister.core.tests.test_lister import HttpListerTester +from swh.lister.phabricator.lister import PhabricatorLister +from swh.lister.phabricator.lister import get_repo_url + + +class PhabricatorListerTester(HttpListerTester, unittest.TestCase): + Lister = PhabricatorLister + test_re = re.compile(r'\&after=([^?&]+)') + lister_subdir = 'phabricator' + good_api_response_file = 'api_response.json' + good_api_response_undefined_protocol = 'api_response_undefined_'\ + 'protocol.json' + bad_api_response_file = 'api_empty_response.json' + first_index = 1 + last_index = 12 + entries_per_page = 10 + + def get_fl(self, override_config=None): + """(Override) Retrieve an instance of fake lister (fl). + """ + if override_config or self.fl is None: + self.fl = self.Lister(forge_url='https://fakeurl', api_token='a-1', + override_config=override_config) + self.fl.INITIAL_BACKOFF = 1 + + self.fl.reset_backoff() + return self.fl + + def test_get_repo_url(self): + f = open('swh/lister/%s/tests/%s' % (self.lister_subdir, + self.good_api_response_file)) + api_response = json.load(f) + repos = api_response['result']['data'] + for repo in repos: + self.assertEqual( + 'https://forge.softwareheritage.org/source/%s.git' % + (repo['fields']['shortName']), + get_repo_url(repo['attachments']['uris']['uris'])) + + f = open('swh/lister/%s/tests/%s' % + (self.lister_subdir, + self.good_api_response_undefined_protocol)) + repo = json.load(f) + self.assertEqual( + 'https://svn.blender.org/svnroot/bf-blender/', + get_repo_url(repo['attachments']['uris']['uris'])) diff --git a/swh/lister/phabricator/tests/test_tasks.py b/swh/lister/phabricator/tests/test_tasks.py new file mode 100644 index 0000000..160efcc --- /dev/null +++ b/swh/lister/phabricator/tests/test_tasks.py @@ -0,0 +1,29 @@ +from unittest.mock import patch + + +def test_ping(swh_app, celery_session_worker): + res = swh_app.send_task( + 'swh.lister.phabricator.tasks.ping') + assert res + res.wait() + assert res.successful() + assert res.result == 'OK' + + +@patch('swh.lister.phabricator.tasks.PhabricatorLister') +def test_incremental(lister, swh_app, celery_session_worker): + # setup the mocked PhabricatorLister + lister.return_value = lister + lister.db_last_index.return_value = 42 + lister.run.return_value = None + + res = swh_app.send_task( + 'swh.lister.phabricator.tasks.IncrementalPhabricatorLister') + assert res + res.wait() + assert res.successful() + + lister.assert_called_once_with( + api_token='', forge_url='https://forge.softwareheritage.org') + lister.db_last_index.assert_called_once_with() + lister.run.assert_called_once_with(min_bound=42)