mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-06 00:28:01 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a511bb2b49 | ||
|
|
aedf9b2c66 | ||
|
|
b9e35a50f5 |
11
CHANGES.rst
11
CHANGES.rst
@@ -1,6 +1,17 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.8.0 (2016-02-14)
|
||||
------------------
|
||||
|
||||
- Don't store issues which are actually pull requests. [Enrico Tröger]
|
||||
|
||||
This prevents storing pull requests twice since the Github API returns
|
||||
pull requests also as issues. Those issues will be skipped but only if
|
||||
retrieving pull requests is requested as well.
|
||||
Closes #23.
|
||||
|
||||
|
||||
0.7.0 (2016-02-02)
|
||||
------------------
|
||||
|
||||
|
||||
@@ -477,6 +477,8 @@ def backup_issues(args, repo_cwd, repository, repos_template):
|
||||
mkdir_p(repo_cwd, issue_cwd)
|
||||
|
||||
issues = {}
|
||||
issues_skipped = 0
|
||||
issues_skipped_message = ''
|
||||
_issue_template = '{0}/{1}/issues'.format(repos_template,
|
||||
repository['full_name'])
|
||||
|
||||
@@ -491,9 +493,17 @@ def backup_issues(args, repo_cwd, repository, repos_template):
|
||||
_issue_template,
|
||||
query_args=query_args)
|
||||
for issue in _issues:
|
||||
# skip pull requests which are also returned as issues
|
||||
# if retrieving pull requests is requested as well
|
||||
if 'pull_request' in issue and (args.include_pulls or args.include_everything):
|
||||
issues_skipped += 1
|
||||
continue
|
||||
|
||||
issues[issue['number']] = issue
|
||||
|
||||
log_info('Saving {0} issues to disk'.format(len(issues.keys())))
|
||||
if issues_skipped:
|
||||
issues_skipped_message = ' (skipped {0} pull requests)'.format(issues_skipped)
|
||||
log_info('Saving {0} issues to disk{1}'.format(len(issues.keys()), issues_skipped_message))
|
||||
comments_template = _issue_template + '/{0}/comments'
|
||||
events_template = _issue_template + '/{0}/events'
|
||||
for number, issue in issues.iteritems():
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = '0.7.0'
|
||||
__version__ = '0.8.0'
|
||||
|
||||
Reference in New Issue
Block a user