Skip to content

Fix release_notes_to_discourse script #7862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jul 22, 2025

Failed here: https://github.com/pymc-devs/pymc/actions/runs/16454405920/job/46507668592

Now that I could recreate the inputs passed by github I could reproduce locally, and confirm the change to json fixes it: https://discourse.pymc.io/t/release-v5-25-0/17206


📚 Documentation preview 📚: https://pymc--7862.org.readthedocs.build/en/7862/

Error 400 was caused by not passing json explicitly.
@@ -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"]}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't like the View on Github, no reason to lose info from a readable URL like this

@ricardoV94 ricardoV94 requested a review from twiecki July 22, 2025 20:33
@ricardoV94 ricardoV94 changed the title Fix release_notes_to_discourse script Fix release_notes_to_discourse script Jul 22, 2025
@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha!

@ricardoV94 ricardoV94 merged commit 0a33057 into pymc-devs:main Jul 22, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants