本文整理匯總了Python中models.Issue.repo方法的典型用法代碼示例。如果您正苦於以下問題:Python Issue.repo方法的具體用法?Python Issue.repo怎麽用?Python Issue.repo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Issue
的用法示例。
在下文中一共展示了Issue.repo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: reconcile_db_with_gh
# 需要導入模塊: from models import Issue [as 別名]
# 或者: from models.Issue import repo [as 別名]
def reconcile_db_with_gh(*args, **kwargs):
ghc = GitHubConnector()
issues = ghc.get_all_issues()
repos = ghc.get_all_repos()
for repo in repos:
r = Repo(github_id=repo.id, name=repo.name)
r.save()
for issue in issues:
i = Issue(github_id=issue.id)
i.title = issue.title
i.number = issue.number
i.repo = Repo.objects.get(name=issue.repository[1])
i.save()
print "Not only did your task run successfully, but you're damned good looking too."