Skip to content

Guard doc-sourced samples: edit them in webhook-registry - #95

Merged
garethx merged 2 commits into
mainfrom
ci/guard-doc-sourced-samples
Nov 19, 2026
Merged

garethx merged 2 commits into
mainfrom
ci/guard-doc-sourced-samples

Conversation

@garethx

@garethx garethx commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Gareth · project thread

Why

Doc samples were edited both here and in webhook-registry's samples-doc/, so the hub and Inspect drifted apart (#92 to #94). From now on they're edited in the registry only, and its new sync workflow (hookdeck/webhook-registry#194) brings them here as a rolling PR from the registry-sync branch.

What changes

  • New check, Doc samples guard. It fails a PR that adds, changes or deletes a file with a source key unless the PR comes from this repo's own registry-sync branch. A fork's branch with that name doesn't count. Captures are unaffected. Replacing a doc sample with a capture (dropping its source key) passes only when the PR is labelled capture, so an edited doc file can't pass as a capture. The check re-runs when labels change.
  • .github/doc-samples-guard.json exempts ordinal and polytomic, whose doc samples are maintained here rather than in the registry.
  • README: the doc-sourced section says where to edit and how the sync works.

Merge after #94. That PR edits 360 doc samples by hand, so it would fail this check. I ran the guard locally: it fails #94's diff as expected and passes when HEAD_REF=registry-sync.

https://claude.ai/code/session_01Mp6yzxrVELJ8wYUxdn1aRi


Generated by Claude Code

Doc-sourced samples (files with a `source` key) come from
webhook-registry's samples-doc through its sync workflow, on the
registry-sync branch. A new check fails any other pull request that
adds, changes or deletes one, so fixes land in the registry and the
hub and Inspect stop drifting apart. Captures are unaffected, and a
capture replacing a doc sample passes. ordinal and polytomic, whose
doc samples are maintained here, are exempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mp6yzxrVELJ8wYUxdn1aRi
@garethx garethx self-assigned this Nov 19, 2026
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webhook-samples Ready Ready Preview Nov 19, 2026 11:42am UTC

Request Review

- The registry-sync exemption now also requires the PR's head repo to be
  this repo, so a fork's registry-sync branch doesn't pass.
- Replacing a doc sample with a capture (dropping the `source` key) now
  needs the PR labelled `capture`; otherwise an edited doc file could pass
  as a capture and the sync would leave it alone for good. The check
  re-runs on label changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mp6yzxrVELJ8wYUxdn1aRi
@garethx
garethx merged commit 72be3f1 into main Nov 19, 2026
3 checks passed
@garethx
garethx deleted the ci/guard-doc-sourced-samples branch November 19, 2026 11:56

This branch was successfully deployed

1 active deployment
Preview — dd57c206 Deployed Nov 19, 2026 by vercel[bot]
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.

2 participants