From ebcfba0efd9b2058e858c6d89d5087ec5ec00aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 4 Oct 2023 22:44:06 -0400 Subject: [PATCH] Document precisely what we're not doing with labels --- move_issue.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/move_issue.py b/move_issue.py index 651cfa8..9f9b056 100644 --- a/move_issue.py +++ b/move_issue.py @@ -37,7 +37,14 @@ def move_issue(source_owner, source_repo, issue_number, destination_owner, desti 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. + # Specifically we aren't going to be getting all the labels for a repo + # with GET /repos/{owner}/{repo}/labels and seeing if our label names + # exist and creating new labels in our new repo with the same name etc + # if they don't with POST /repos/{owner}/{repo}/labels and finally + # assigning all of those new or existing labels to our new issue with + # POST /repos/{owner}/{repo}/issues/{index}/labels + + # Note: Labels already removed with pop so we're good on not blowing up. assignees = json_response.pop('assignees', {}) if assignees: