1
0
Fork 0
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:
crass 2019-09-28 01:58:07 -05:00
parent a553714f6f
commit 1d2bc42dd6

View file

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