ci: add PR explainer workflow (cloud + --upsert)#6
Open
utsengar wants to merge 2 commits into
Open
Conversation
A coding agent generates an HTML explainer of the diff on each push; `publish --upsert --metadata repo=...,pr=...` keeps the URL stable for the PR's lifetime. A sticky comment carries the URL and updates in place; the drop is deleted when the PR closes. Requires repo secrets HTMLBIN_TOKEN and ANTHROPIC_API_KEY. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
PR explainer: https://htmlbin.dev/p/r6w2pQhgT Generated from the diff against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dogfoods
@htmlbin/clion this repo's own PRs. On every push, a coding agent reads the diff and writes a self-contained HTML explainer to./preview.html; the CLI publishes it via the cloud backend with--upsert --metadata repo=... --metadata pr=..., so the URL is stable for the PR's lifetime. A sticky comment carries the URL and updates in place on each push; the drop is deleted when the PR closes.Combines the two existing example workflows:
examples/agent-preview-workflow.yml— agent-generated HTMLexamples/cloud-upsert-workflow.yml— cloud backend + metadata-keyed upsertRequired secrets (one-time setup)
Before this workflow does anything useful, add two repo secrets:
HTMLBIN_TOKEN— runhtmlbin loginlocally, thencat ~/.config/htmlbin/tokenand paste itANTHROPIC_API_KEY— for Claude Code, which writes the explainer HTMLBehavior
opened/synchronize/reopened→ publish job runs, sticky comment shows the explainer URLclosed→ teardown job deletes the drop and updates the sticky commentpull_request)Test plan
HTMLBIN_TOKENandANTHROPIC_API_KEYrepo secrets🤖 Generated with Claude Code