WIP: adhesion, correcting forge API

This commit is contained in:
Adrien Bourmault 2023-11-03 18:31:16 +01:00
parent e0780ac62b
commit 6177be5811
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,8 @@ def gestion_read(req):
return response.json() return response.json()
def forgejo_post_issue(owner, repo, title, body, labels): 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, "body": body,
"labels": labels, "labels": labels,
"title": title, "title": title,
@ -316,7 +317,6 @@ def validate_registrations_worker():
pass pass
os.rename(registration, registration.replace("attente", "valide")) os.rename(registration, registration.replace("attente", "valide"))
FORGE = pygitea.API(GITEA_URL, token=gestion_get_secret())
def main(): def main():
setup_workdir() setup_workdir()
new_registrations_worker() new_registrations_worker()