Permalink
Browse files

Update issue state after adding comments.

The vast majority of the issues we'll migrate start out open and are
then closed, and it's more natural to see the 'closed' update after all
the comments.
  • Loading branch information...
1 parent 4e05752 commit 1a057a9cf950d733e922f831fee19cf89c291832 @dnschnur dnschnur committed Sep 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 migrateissues.py
View
4 migrateissues.py
@@ -168,8 +168,6 @@ def add_issue_to_github(issue):
if not options.dry_run:
github_labels = [ github_label(label) for label in labels ]
github_issue = github_repo.create_issue(title, body = body.encode("utf-8"), labels = github_labels)
- if issue.state.text != "open":
- github_issue.edit(state = issue.state.text)
# Assigns issues that originally had an owner to the current user
@@ -275,6 +273,8 @@ def process_gcode_issues(existing_issues):
if github_issue:
add_comments_to_issue(github_issue, gid)
+ if github_issue.state != issue.state.text:
+ github_issue.edit(state = issue.state.text)
output("\n")
previous_gid = gid

0 comments on commit 1a057a9

Please sign in to comment.