From 6d2a12b7a4f4cb7c2c2d38bc1d92257a39aa6ab6 Mon Sep 17 00:00:00 2001 From: naiba Date: Mon, 16 Feb 2026 13:42:26 +0800 Subject: [PATCH] fix: use Authorization header instead of access_token in request body for AtomGit API --- .github/sync_atomgit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/sync_atomgit.py b/.github/sync_atomgit.py index fe82c31..06aac74 100644 --- a/.github/sync_atomgit.py +++ b/.github/sync_atomgit.py @@ -39,8 +39,8 @@ def sync_to_atomgit(tag, body, files): access_token = os.environ["ATOMGIT_PAT"] release_api_uri = f"{ATOMGIT_API}/repos/{ATOMGIT_OWNER}/{ATOMGIT_REPO}/releases" + auth_headers = {"Authorization": f"Bearer {access_token}"} release_data = { - "access_token": access_token, "tag_name": tag, "name": tag, "body": body, @@ -51,7 +51,9 @@ def sync_to_atomgit(tag, body, files): release_resp = None for attempt in range(3): try: - release_resp = requests.post(release_api_uri, json=release_data, timeout=30) + release_resp = requests.post( + release_api_uri, json=release_data, headers=auth_headers, timeout=30 + ) release_resp.raise_for_status() break except requests.exceptions.Timeout: