@@ -907,6 +907,8 @@ def backup_pulls(args, repo_cwd, repository, repos_template):
907907 pulls = {}
908908 _pulls_template = '{0}/{1}/pulls' .format (repos_template ,
909909 repository ['full_name' ])
910+ _issue_template = '{0}/{1}/issues' .format (repos_template ,
911+ repository ['full_name' ])
910912 query_args = {
911913 'filter' : 'all' ,
912914 'state' : 'all' ,
@@ -946,10 +948,17 @@ def backup_pulls(args, repo_cwd, repository, repos_template):
946948
947949 log_info ('Saving {0} pull requests to disk' .format (
948950 len (list (pulls .keys ()))))
951+ # Comments from pulls API are only _review_ comments
952+ # regular comments need to be fetched via issue API.
953+ # For backwards compatibility with versions <= 0.41.0
954+ # keep name "comment_data" for review comments
955+ comments_regular_template = _issue_template + '/{0}/comments'
949956 comments_template = _pulls_template + '/{0}/comments'
950957 commits_template = _pulls_template + '/{0}/commits'
951958 for number , pull in list (pulls .items ()):
952959 if args .include_pull_comments or args .include_everything :
960+ template = comments_regular_template .format (number )
961+ pulls [number ]['comment_regular_data' ] = retrieve_data (args , template )
953962 template = comments_template .format (number )
954963 pulls [number ]['comment_data' ] = retrieve_data (args , template )
955964 if args .include_pull_commits or args .include_everything :
0 commit comments