Skip to content

Commit 0a33057

Browse files
committed
Fix release_notes_to_discourse script
Error 400 was caused by not passing json explicitly.
1 parent 5f611b5 commit 0a33057

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/publish_release_notes_to_discourse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def format_release_content(config: dict[str, str]) -> tuple[str, str]:
6464
6565
- **Version:** `{config["RELEASE_TAG"]}`
6666
- **Repository:** [{config["REPO_NAME"]}](https://github.com/{config["REPO_NAME"]})
67-
- **Release Page:** [View on GitHub]({config["RELEASE_URL"]})
67+
- **Release Page:** {config["RELEASE_URL"]}
6868
- Note: It may take some time for the release to appear on PyPI and conda-forge.
6969
7070
## 📋 Release Notes
@@ -105,7 +105,7 @@ def publish_release_to_discourse(config: dict[str, str]) -> bool:
105105
url = f"{config['DISCOURSE_URL']}/posts.json"
106106

107107
try:
108-
response = requests.post(url, headers=headers, data=topic_data)
108+
response = requests.post(url, headers=headers, json=topic_data)
109109
response.raise_for_status()
110110

111111
data = response.json()

0 commit comments

Comments
 (0)