Skip to content
Snippets Groups Projects
Verified Commit f4fe1b05 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

swh.lister.*: Formatting

parent 27f3eaf9
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2017 the Software Heritage developers
# Copyright (C) 2017-2018 the Software Heritage developers
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -14,15 +14,15 @@ class BitBucketLister(SWHIndexingHttpLister):
def get_model_from_repo(self, repo):
return {
'uid': repo['uuid'],
'indexable': repo['created_on'],
'name': repo['name'],
'full_name': repo['full_name'],
'html_url': repo['links']['html']['href'],
'origin_url': repo['links']['clone'][0]['href'],
'origin_type': repo['scm'],
'description': repo['description']
}
'uid': repo['uuid'],
'indexable': repo['created_on'],
'name': repo['name'],
'full_name': repo['full_name'],
'html_url': repo['links']['html']['href'],
'origin_url': repo['links']['clone'][0]['href'],
'origin_type': repo['scm'],
'description': repo['description']
}
def get_next_target_from_response(self, response):
body = response.json()
......
# Copyright (C) 2017 the Software Heritage developers
# Copyright (C) 2017-2018 the Software Heritage developers
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -16,16 +16,16 @@ class GitHubLister(SWHIndexingHttpLister):
def get_model_from_repo(self, repo):
return {
'uid': repo['id'],
'indexable': repo['id'],
'name': repo['name'],
'full_name': repo['full_name'],
'html_url': repo['html_url'],
'origin_url': repo['html_url'],
'origin_type': 'git',
'description': repo['description'],
'fork': repo['fork'],
}
'uid': repo['id'],
'indexable': repo['id'],
'name': repo['name'],
'full_name': repo['full_name'],
'html_url': repo['html_url'],
'origin_url': repo['html_url'],
'origin_type': 'git',
'description': repo['description'],
'fork': repo['fork'],
}
def transport_quota_check(self, response):
reqs_remaining = int(response.headers['X-RateLimit-Remaining'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment