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()