From 6177be581147f82dcc88879ab28011e4eb97f98e Mon Sep 17 00:00:00 2001 From: "Adrien Bourmault (neox)" Date: Fri, 3 Nov 2023 18:31:16 +0100 Subject: [PATCH] WIP: adhesion, correcting forge API --- controle_adhesion/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controle_adhesion/main.py b/controle_adhesion/main.py index 4fb1beb..1f3aadc 100755 --- a/controle_adhesion/main.py +++ b/controle_adhesion/main.py @@ -68,7 +68,8 @@ def gestion_read(req): return response.json() def forgejo_post_issue(owner, repo, title, body, labels): - import_response: requests.Response = FORGE.post("/repos/" + owner + "/" + repo + "/issues", json={ + gt = pygitea.API(GITEA_URL, token=gestion_get_secret()) + import_response: requests.Response = gt.post("/repos/" + owner + "/" + repo + "/issues", data={ "body": body, "labels": labels, "title": title, @@ -316,7 +317,6 @@ def validate_registrations_worker(): pass os.rename(registration, registration.replace("attente", "valide")) -FORGE = pygitea.API(GITEA_URL, token=gestion_get_secret()) def main(): setup_workdir() new_registrations_worker()