From 4b56b6037c01bffdbe49c984406790c4a534a8d9 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Mon, 4 Sep 2017 19:40:45 +0200 Subject: [PATCH] github.models: add fork information to repos --- swh/lister/github/lister.py | 3 ++- swh/lister/github/models.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/swh/lister/github/lister.py b/swh/lister/github/lister.py index 4b83bb5..af27899 100644 --- a/swh/lister/github/lister.py +++ b/swh/lister/github/lister.py @@ -23,7 +23,8 @@ class GitHubLister(SWHIndexingHttpLister): 'html_url': repo['html_url'], 'origin_url': repo['html_url'], 'origin_type': 'git', - 'description': repo['description'] + 'description': repo['description'], + 'fork': repo['fork'], } def transport_quota_check(self, response): diff --git a/swh/lister/github/models.py b/swh/lister/github/models.py index 094526d..a82c2e1 100644 --- a/swh/lister/github/models.py +++ b/swh/lister/github/models.py @@ -2,7 +2,7 @@ # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information -from sqlalchemy import Column, Integer +from sqlalchemy import Column, Boolean, Integer from swh.lister.core.models import ModelBase @@ -13,6 +13,7 @@ class GitHubModel(ModelBase): uid = Column(Integer, primary_key=True) indexable = Column(Integer, index=True) + fork = Column(Boolean) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)