[process] gate PR-body images: every url must resolve, designs/ images must be sha-pinned - #108
Merged
Merged
Conversation
…s must be sha-pinned Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LPzpANKKH7rouBXBtyY6jf Signed-off-by: BenchCAD <benchcad@users.noreply.github.com>
…y links renders that exist; CONTRIBUTING states the pin rule Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LPzpANKKH7rouBXBtyY6jf Signed-off-by: BenchCAD <benchcad@users.noreply.github.com>
Repo rule: no Chinese outside *.zh.md — drops the Chinese halves of the four new gate messages. Signed-off-by: BenchCAD <benchcad@users.noreply.github.com>
# Conflicts: # CONTRIBUTING.md
HaozheZhang6
approved these changes
Jul 30, 2026
miachen0401
approved these changes
Jul 30, 2026
This was referenced Jul 31, 2026
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.
Nothing checks that the images in a PR body actually load. This adds that check, plus a fix to the bot that writes such links itself.
1. New: the image gate
Added to the existing
checkjob. It fails a PR when:designs/is pinned to a branch name instead of a commit shaIt reads both
and<img src="url">. The second form is what you must write to set a width, and a markdown-only reader sees nothing — that exact hole let two family PRs ship broken previews in the sibling repo with CI green.docs/assets/refsimages on a branch only warn. 10 open PRs do this and stay green.Why the branch rule
An image URL holds a ref plus a path.
Your fork branch is deleted when this PR merges. Every preview pinned to it dies at that moment, and the merged family can no longer be reviewed. A commit sha never moves.
So: copy the sha off your branch and use
blob/<sha>/<path>?raw=true.2. The dossier bot wrote links that rot
When a family merges, the bot comments on its issue with the renders. It linked
blob/main/...— even though it already computed the merge sha for the text "landed in3713fea".mainmoves, so a later rename would kill a merged family's permanent record. It also hard-codedpreview.png.Now it pins to the merge commit and links only files that exist.
Tested
Ran the script straight out of this YAML against real PR bodies, against the live API.
issue-31-metric-plastic-cable-glandadd-vertical-latch-toggle-clampadd-minifix-cam-housingdocs/assets/refsonmain)user-attachmentsuploads)Replayed the dossier bot on #38 and #36. Every link opens at the merge sha.
Those three PRs are already fixed
#52, #50 and #34 have been re-pinned to their branch head shas. Image URLs only — no code, and the previews show exactly what they showed before. All 8 rewritten URLs were checked before the edit, and all three now pass. Each author got a one-line note explaining it.
So this can merge without turning any open PR red.
Docs
CONTRIBUTING.md, therequire-issue-link.ymlrow: states the rule and the fork-branch reason.Both repos now have 0 broken images.