Fixing the Daily Content Generator’s Bluesky Payload – A Code‑First Walkthrough
Fixing the Daily Content Generator’s Bluesky Payload – A Code‑First Walkthrough TL;DR: I rewrote the payload builder for the daily post generator so it correctly writes bluesky_es.json and updates metadata.json . The change eliminates a silent write‑failure and lets the CI pipeline publish to Bluesky without manual intervention. The Problem Our content-automation pipeline runs every morning,…
The Bluesky content generator failed to publish posts because it couldn't locate the necessary payload file. The CI pipeline would skip the git add and commit steps whenever this issue occurred, leaving the metadata flagged as unpublished. The problem stemmed from the file path construction, which used a hard-coded locale of "en" regardless of the actual content being processed.
To fix this, a utility was created to manage locales, ensuring that the correct file name was generated based on the locale provided. The generator was then updated to correctly build the payload for both English and Spanish drafts. Additionally, the metadata file was updated atomically to correctly record the published status and URIs for each locale, eliminating the silent write failures that had been causing the Bluesky posts to go unpublished.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.