diff --git a/move_issue.py b/move_issue.py index e21dcc7..651cfa8 100644 --- a/move_issue.py +++ b/move_issue.py @@ -34,6 +34,11 @@ def move_issue(source_owner, source_repo, issue_number, destination_owner, desti print(f"We have removed the milestone {milestone['title']} from this issue (milestones are specific to repositories).") # Note that pop has already thrown out the milestone from json_response + labels = json_response.pop('labels', {}) + if labels: + print("Labels are unique per project and rather than messing with creating ones with the same name we have removed the following labels:", ', '.join(l['name'] for l in labels)) + # Labels already removed with pop so we're good. + assignees = json_response.pop('assignees', {}) if assignees: # 'assignee' is deprecated; remove it.