mirror of
https://github.com/clockfort/GitHub-Backup.git
synced 2025-03-16 00:00:06 +01:00
Handle pulls from searching and get_issues.
This commit is contained in:
parent
a553714f6f
commit
1d2bc42dd6
1 changed files with 8 additions and 1 deletions
|
@ -404,7 +404,14 @@ class RepositoryBackup(object):
|
|||
for issue in issues:
|
||||
project = os.path.basename(os.path.dirname(os.path.dirname(issue.url)))
|
||||
if isinstance(issue, github.Issue.Issue):
|
||||
issue = issue.as_pull_request()
|
||||
try:
|
||||
if issue.pull_request:
|
||||
issue = issue.as_pull_request()
|
||||
else:
|
||||
continue
|
||||
except github.UnknownObjectException, e:
|
||||
LOGGER.info(" * %s[%s]: No associated pull request", project, issue.number)
|
||||
continue
|
||||
issue_data = issue.raw_data.copy()
|
||||
LOGGER.info(" * %s[%s]: %s", project, issue.number, issue.title)
|
||||
if args.include_pull_comments and issue.comments:
|
||||
|
|
Loading…
Add table
Reference in a new issue