Remove labels so nothing blows up, and tell people what we removed

This commit is contained in:
benjamin melançon 2023-10-04 22:29:16 -04:00
parent 1df3f14ecd
commit d7233f55f4

View file

@ -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).") 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 # 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', {}) assignees = json_response.pop('assignees', {})
if assignees: if assignees:
# 'assignee' is deprecated; remove it. # 'assignee' is deprecated; remove it.