github.models: add fork information to repos

This commit is contained in:
Nicolas Dandrimont 2017-09-04 19:40:45 +02:00
parent f6f077b789
commit 4b56b6037c
2 changed files with 4 additions and 2 deletions

View file

@ -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):

View file

@ -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)