Skip to content

ci: push changelog snapshot to the console on release - #38

Open
SPIKESPIGEL404 wants to merge 1 commit into
mainfrom
feat/notify-console-changelog
Open

ci: push changelog snapshot to the console on release#38
SPIKESPIGEL404 wants to merge 1 commit into
mainfrom
feat/notify-console-changelog

Conversation

@SPIKESPIGEL404

Copy link
Copy Markdown
Contributor

Producer side of the console's What's New pipeline (Step 4 of replacing UserJot).

When curated changelog content lands on main, emit the changelog as JSON and POST it (HMAC-signed) to the BitRouter console's ingest webhook, so its What's New panel updates immediately instead of the console polling.

What's here

  • scripts/emit-changelog-json.mjs — reads content/changelog/*.mdx frontmatter (js-yaml, same style as generate-changelog-latest.mjs) into the same ChangelogItem shape the site uses (url = /changelog/<slug>). No build step needed.
  • .github/workflows/notify-console-changelog.yml — on push to main touching content/changelog/** (or manual dispatch): build the payload, HMAC-SHA256 sign it with CHANGELOG_WEBHOOK_SECRET, and POST /api/webhooks/changelog on the console.

Setup required before this does anything

  • Add Actions secret CHANGELOG_WEBHOOK_SECRET — must equal the console's env value (openssl rand -hex 32, set identically in both).
  • Optional Actions variable CONSOLE_URL — console origin (defaults to https://cloud.bitrouter.ai).

Validation

  • Generator runs clean against current content → 22 items, correct shape.
  • Confirmed the workflow's openssl HMAC byte-for-byte matches the console's createHmac verification, so signatures will be accepted.

Console side (ingest webhook /api/webhooks/changelog, changelog_items table, What's New panel + unread badge) is on the console branch claude/userjot-feedback-whats-new-aebccb.

🤖 Generated with Claude Code

Add the producer side of the console's "What's New" pipeline: when curated
changelog content lands on main, emit the changelog as JSON and POST it to the
BitRouter console's ingest webhook so its What's New panel updates immediately.

- scripts/emit-changelog-json.mjs: read content/changelog/*.mdx frontmatter
  (js-yaml, like generate-changelog-latest.mjs) into the same ChangelogItem
  shape the site uses (url = /changelog/<slug>). No build needed.
- .github/workflows/notify-console-changelog.yml: on push to main touching
  content/changelog/** (or manual dispatch), build the payload, HMAC-sign it
  with CHANGELOG_WEBHOOK_SECRET, and POST to /api/webhooks/changelog.

Requires the CHANGELOG_WEBHOOK_SECRET Actions secret (shared with the console)
and an optional CONSOLE_URL variable (defaults to https://cloud.bitrouter.ai).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant