Repository navigation
docs(cli): Move remaining fragment examples into command metadata - #1633
Merged
Merged
Conversation
Move every remaining "Examples" section from the CLI docs fragments and command fullDescription strings into each command's docs.examples so examples render consistently in --help, the generated docs, and the skill references. Fragments keep their explanatory prose under topical headings. The skill generator no longer harvests examples from fragment markdown; command metadata is the only source. Add enforcement so examples don't drift back: - check:fragments rejects Examples headings in command fragments - sentry-cli/no-examples-in-full-description rejects Examples blocks in command and route fullDescription strings Co-Authored-By: BYK <burak.kaya@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Remove the leftover `## Examples` block from `sentry cli defaults` fullDescription (its docs.examples already render in help) and carry the missing alias, agent-skills, graphics, and `--clear --yes` cases into docs.examples. Fix the explore UTC-window example to use the supported `..` range separator. Extend no-examples-in-full-description to also reject markdown Examples headings, which is how the defaults block slipped past the rule.
BYK
requested changes
Oct 23, 2026
Replace regex-based markdown parsing in the doc scripts with the marked lexer via new helpers in script/markdown.ts: - check-fragments: find headings (Examples sections, subcommand coverage) from lexer tokens instead of stripping fences with regexes - check-stale-references: blank code blocks with the lexer, keeping line numbers aligned so findings no longer need a line lookup - generate-skill: extract sections, code blocks, and nested headings with the lexer. The old section regex treated `# comment` lines in bash blocks as headings and cut the Install Script section short, so the generated SKILL.md now includes the full install snippet. The no-examples-in-full-description lint rule now also uses the marked lexer. A new no-regex-markdown-parsing rule flags regexes that match markdown headings or code fences in src/ and script/, and AGENTS.md documents the convention.
- alert issues edit: use the workflow-native {type, comparison,
conditionResult} condition shape that the workflows API accepts,
instead of the legacy class-path id
- api: add -X PUT to the nested-field example; GET sends -F fields as
query params, so the example never built {options: {sampleRate}}
Both examples were carried over unchanged from the old help text.
BYK
approved these changes
Oct 23, 2026
sentry-junior Bot
added a commit
that referenced
this pull request
Oct 23, 2026
Resolve conflicts with #1633, which moved the remaining hand-written examples into `docs.examples`: take main's version of the dashboard commands and the alert/dashboard fragments, then regenerate the skill references. check:doc-examples now covers the migrated examples and flagged: - `dashboard revisions` and `dashboard restore` examples that pass a bare `my-org` (a project lookup); changed to `my-org/` - examples that start with `sudo` or `NAME=value`, which the check misread as the command name; it now skips those prefixes Co-Authored-By: BYK <burak.kaya@sentry.io>
sentry-junior Bot
added a commit
that referenced
this pull request
Oct 23, 2026
#1633 added the `no-regex-markdown-parsing` lint rule. Replace the fenced block regex with the shared `markdownCodeBlocks` / `blankCodeBlocks` helpers in script/markdown.ts, which use the same lexer as the docs renderer.
This branch was previously deployed
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.
The earlier
docs.examplesmigration missed several fragments, and some newer commands added examples back to fragments orfullDescription. This PR moves every remaining Examples section into the owning command'sdocs.examples, so examples show up the same way in--help, the generated docs pages, and the skill references.Fragments keep their explanatory prose under topical headings, like search syntax, multiple accounts, release workflow, and debug ID injection. Fragments that only held examples are now empty. Sample-output blocks that were part of the old Examples sections are dropped. The
sentry issueroute-group help also loses its duplicateExamples:list, because each of those commands already has its own examples.The skill generator no longer pulls examples out of fragment markdown. Command metadata is now the only source, which removes the heading-to-command matching heuristics in
generate-skill.tsandintrospect.ts.Two checks keep examples from coming back:
check:fragments(already part ofci:policy) now fails on anyExamplesheading in a command fragment, ignoring fenced code blocks.sentry-cli/no-examples-in-full-description, fails when afullDescriptioninsrc/commands/**orsrc/app.tscontains anExamples:/Example:block. Validation/error messages and inlineExample: …text are still allowed.via BYK.
--
View Junior Session in Sentry