fix(changelog): robust, visible PR-number resolution (0202) - #191
Merged
Conversation
resolve-prs.mjs now falls back to the GitHub 'commits → PRs' API (keyed by the fragment's adding commit) when the git-subject parse misses — merge-method-proof, so rebase-merges resolve too. Unresolved fragments emit a ::warning + summary line instead of silently shipping bare. deploy-site passes GITHUB_TOKEN to the step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cal date --pr auto (default) asks 'gh pr view' for the current branch's PR and writes it in (one commit, visible in repo/previews/local); omitted when no PR exists yet → deploy resolves it. Date now stamps the LOCAL day, fixing the UTC-tomorrow drift. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Server/docs PRs have no visual-capture gallery; render a clear 'View PR #N →' link where the gallery would be so they don't read as broken. Refresh the stale changelog.ts comment to describe the real author→deploy PR-number flow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
✓ Changelog fragment found — thanks! |
…auto) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Preview removed for PR #191. |
new.mjs/resolve-prs.mjs are manually-run/deploy-time CLI scripts (not imported and not unit-tested), so the unused-file + CRAP findings are noise — mirror the existing examples/** and scripts/visuals/** exclusions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Implements exploration 0202 — makes changelog PR-number resolution robust and visible without adding a second commit. (Supersedes the doc-only PR #190, which is folded in here.)
The investigation found PR linking wasn't actually broken — the deploy-time
resolve-prs.mjsworks — but it was fragile (regex over merge-commit subjects), silent on failure, and entries without screenshots looked bare. This hardens all three.Robustness —
resolve-prs.mjs+ deploycommits/{addSha}/pullsAPI (keyed by the fragment's adding commit) — merge-method-proof, so rebase-merges resolve too. Verified live:commits/4f413f61/pulls → #187.::warningannotation + summary line instead of silently shipping numberless. Never blocks the deploy (entries still render).deploy-site.ymlpassesGITHUB_TOKENto the step.Authoring —
new.mjs--pr auto(default) bakes the PR number viagh pr viewwhen the branch already has a PR — one commit, visible in the repo/previews/local. Omitted when no PR exists yet → the deploy resolves it. (--pr <N>/--pr noneoverride.) This fragment was added that way.UI —
index.astroNotably not done (a finding, not a gap)
apps/web, not the Astrosite/, so the changelog page is never in previews — running resolve there would be dead code. Skipped to avoid useless pipeline surface.Testing
resolve-prs.mjsresolves all current slug entries via git; API fallback verified live against the real endpoint.new.mjs: local-date + graceful no-PR + bake-on---prall smoke-tested.site/builds (70 pages); "View PR feat(cloud): metered AI through OpenRouter + spend cap (0201) #187" affordance present in the built changelog HTML.packages apps;format:checkskipsscripts/site), but formatted and syntax-checked anyway.Exploration:
docs/explorations/0202_..._CHANGELOG_PR_NUMBER_RESOLUTION_ROBUSTNESS.md(items checked off).🤖 Generated with Claude Code