From 32583205b6a6f50ab5eedad472f4a538eaecc98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 4 Oct 2023 21:32:34 -0400 Subject: [PATCH] Update notes --- move_issue.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/move_issue.py b/move_issue.py index b635106..d81adaf 100644 --- a/move_issue.py +++ b/move_issue.py @@ -94,12 +94,11 @@ def move_issue(source_owner, source_repo, issue_number, destination_owner, desti # If we are confident the API is remaining stabel we can just use the same path # with patch, post, and get when the path is the same which is the case here. # Note though we often change the owner and repo and index when making the URL! - # This runs and the state string is correct and it *should* work but it does not. - # See https://codeberg.org/forgejo/forgejo/issues/1280#issuecomment-1262414 body = { "state": "closed" } patch_issue_url = API_PATCH_ISSUE.format(instance=FORGEJO_INSTANCE, owner=source_owner, repo=source_repo, index=issue_number) + # Note that sending body as JSON here is needed for 'state' to be changed. closed_response = requests.patch(patch_issue_url, headers=headers, json=body, params={"access_token": FORGEJO_API_TOKEN}) # print(closed_response.json())