From 9eab317d459659d640937e1b261a1165497aeaa7 Mon Sep 17 00:00:00 2001 From: ricardoV94 Date: Tue, 22 Jul 2025 22:31:46 +0200 Subject: [PATCH] Fix release_notes_to_discourse script Error 400 was caused by not passing json explicitly. --- scripts/publish_release_notes_to_discourse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish_release_notes_to_discourse.py b/scripts/publish_release_notes_to_discourse.py index 53ae792fb..9891fba4f 100644 --- a/scripts/publish_release_notes_to_discourse.py +++ b/scripts/publish_release_notes_to_discourse.py @@ -64,7 +64,7 @@ def format_release_content(config: dict[str, str]) -> tuple[str, str]: - **Version:** `{config["RELEASE_TAG"]}` - **Repository:** [{config["REPO_NAME"]}](https://github.com/{config["REPO_NAME"]}) -- **Release Page:** [View on GitHub]({config["RELEASE_URL"]}) +- **Release Page:** {config["RELEASE_URL"]} - Note: It may take some time for the release to appear on PyPI and conda-forge. ## 📋 Release Notes @@ -105,7 +105,7 @@ def publish_release_to_discourse(config: dict[str, str]) -> bool: url = f"{config['DISCOURSE_URL']}/posts.json" try: - response = requests.post(url, headers=headers, data=topic_data) + response = requests.post(url, headers=headers, json=topic_data) response.raise_for_status() data = response.json()