Skip to content

docs: PR gatekeeper step-by-step guide with portal captures - #175

Merged
sre-helmcode merged 2 commits into
mainfrom
docs/pr-gatekeeper-guide
Oct 12, 2026
Merged

sre-helmcode merged 2 commits into
mainfrom
docs/pr-gatekeeper-guide

Conversation

@sre-helmcode

Copy link
Copy Markdown
Contributor

What

A new guide, PR gatekeeper (/docs/pr-gatekeeper, /es/docs/pr-gatekeeper): a step-by-step walkthrough, with real portal captures, of the automation that checks every pull request against a team's minimum bar and keeps the verdict in one comment. It is the setup running on our own repositories (PR gatekeeper: helmcode/nan-cloud-api / nan-cloud-ui), so members see what they can build with automations and exactly how.

Sections: what you will build (a real red verdict, then green after pushing tests, rewritten generically), before you start, save your GitHub tokens (read token for the agent, write token for actions only), create the automation (card by card: agent, repository, secrets, approval, limits, the instructions), connect GitHub (NaN webhook with the template filter, GitHub settings), open a pull request (runs list, run page with the checkout, output, proposal, apply run), push again (sticky comment, superseded run), troubleshooting (deliveries, reason codes, proposal_invalid, body_artifact, action_failed...), cost, ideas to adapt it.

Why

Owner request: members need a concrete use case to learn automations. The existing "Recipe: PR gatekeeper" in /docs/automations stays the short version and now links the guide; the introduction lists it.

Changes

  • src/content/docs/pr-gatekeeper.mdx + src/content/docs-es/pr-gatekeeper.mdx (order 22, Guides).
  • public/docs/pr-gatekeeper/pg-01..16-*.webp: 16 captures, lossless WebP, 6 to 19 KB each. Taken from the owner's account; the webhook URL, secret hints (last 4 characters) and run ids in paths were redacted before capture or painted over; the sidebar (email, admin link) is cropped out. Nothing was changed in the account: no save, no trigger created, rotated or revealed; the session was signed out.
  • examples.md / apps.md (EN/ES): order 22/23 -> 23/24, so the guide sits right after Webhooks.
  • automations.mdx (EN/ES): one paragraph in the recipe pointing to the guide.
  • intro.md (EN/ES): the guide in "Where to go next".
  • src/tests/layouts/prGatekeeperDocs.test.ts: order, links and anchors per locale, captures exist and match their declared size, the folder holds exactly those captures, each under 300 KB, alt and caption, portal labels, recommended settings, token split, instructions content, example comments (only the harmless internal/gktest paths), troubleshooting codes, ES/EN structural parity and identical code blocks, no em-dashes, no internals, nothing private (UUIDs, webhook paths, token prefixes, email).

Test evidence

  • npx vitest run: 78 files, 2001 tests passed. (src/tests/api/docs.test.ts manifest test occasionally times out when the machine is loaded, also on main; passes on rerun.)
  • npm run build: OK. Pages rendered and checked in the dev server at desktop and 390 px width (no horizontal page scroll).

Deploy notes

No VERSION file in this repo; merging to main deploys the site as usual. No env vars.

🤖 Generated with Claude Code

barckcode and others added 2 commits October 12, 2026 18:23
New guide /docs/pr-gatekeeper (EN) and /es/docs/pr-gatekeeper (ES): a
walkthrough of the PR gatekeeper automation we run on our own repositories,
from the GitHub tokens to the sticky comment, with 16 portal captures
(template picker, editor cards, webhook filter, trigger, runs, run page,
proposal, apply run, superseded run, deliveries), the instructions, example
comments, troubleshooting, cost and ideas to adapt it.

- Captures in public/docs/pr-gatekeeper/ (lossless WebP, 6 to 19 KB each),
  with webhook URL, secret hints and run ids redacted.
- The automations recipe (EN/ES) stays the short version and links the guide;
  the introduction lists it.
- Guide placed after Webhooks: Examples and Apps move to orders 23 and 24.
- Tests: prGatekeeperDocs.test.ts (order, links and anchors per locale,
  captures exist and match their markup, folder and size budget, portal
  labels, recommended settings, token split, instructions, example comments,
  troubleshooting codes, ES/EN parity, nothing private, no em-dashes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Deliveries capture: GitHub delivery ids redacted after the first 8 chars.
- Proposal capture now from the same run as the summary and output.
- Secrets step: save the tokens under explicit names, explain the three
  fields of a secret row, the caption says the capture uses one token.
- Running workspace and Software panel in the prerequisites; repository
  access and expiration for the fine-grained token.
- Troubleshooting: Not accepted outcome, GitHub 404/415, clone failures
  happen during the checkout.
- Accuracy: the agent can comment, review and label; comment wording varies;
  improvements land in Suggestions.
- Test: clearer failure for a capture missing from the markup; note that
  pixels need a human privacy check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sre-helmcode
sre-helmcode merged commit e2c990e into main Oct 12, 2026
1 check passed
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