Commit dd4f76e
authored
refactor(docs): gitignore generated command docs, extract fragments (#696)
## Summary
- Gitignore generated command docs (`docs/src/content/docs/commands/`) —
they're rebuilt at build time from CLI metadata + hand-written fragments
- Extract hand-written examples/guides into
`docs/src/fragments/commands/` (19 fragment files)
- Snap `PERIOD_BRIEF` example dates to 1st of month (~12 changes/year
instead of 365)
- Skill files (`plugins/sentry-cli/skills/sentry-cli/`) remain committed
for external plugin consumers, with slimmed CI auto-commit
## Motivation
Generated files with dynamic dates (`PERIOD_BRIEF` computed from `new
Date()`) caused daily churn in PRs via CI auto-commit. Command docs were
a mix of auto-generated flag tables and hand-written content, making
them impossible to gitignore without losing the custom parts.
## Changes
### Fragment extraction
- Split each command doc into: generated part (gitignored output) +
hand-written fragment (committed source)
- `generate-command-docs.ts` now reads custom content from
`docs/src/fragments/commands/{route}.md`
- New `check:fragments` script validates fragment ↔ route consistency
### Build pipeline
- New `generate:docs` composite script chains `generate:command-docs` →
`generate:skill`
- All dependent scripts (`dev`, `build`, `typecheck`, `test:*`) use
`generate:docs` instead of `generate:skill`
- CI `build-docs` and `docs-preview` jobs run generation before `astro
build`
### CI simplification
- `check-skill` job → `check-generated`: validates fragments,
auto-commits skill files only (not command docs)
- Deleted `generate-skill.yml` workflow (superseded by
`check-generated`)
- Deleted `check:skill` and `check:command-docs` scripts (replaced by
`check:fragments`)1 parent 07da58d commit dd4f76e
File tree
52 files changed
+847
-2101
lines changed- .github/workflows
- docs
- public/.well-known/skills
- src
- content/docs/commands
- fragments/commands
- plugins
- sentry-cli/skills/sentry-cli/references
- script
- src/lib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
52 files changed
+847
-2101
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | | - | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
659 | 667 | | |
660 | 668 | | |
661 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
662 | 679 | | |
663 | 680 | | |
664 | 681 | | |
| |||
677 | 694 | | |
678 | 695 | | |
679 | 696 | | |
680 | | - | |
| 697 | + | |
681 | 698 | | |
682 | 699 | | |
683 | 700 | | |
684 | 701 | | |
685 | 702 | | |
686 | 703 | | |
687 | 704 | | |
688 | | - | |
| 705 | + | |
689 | 706 | | |
690 | 707 | | |
691 | 708 | | |
| |||
699 | 716 | | |
700 | 717 | | |
701 | 718 | | |
702 | | - | |
703 | | - | |
| 719 | + | |
| 720 | + | |
704 | 721 | | |
705 | 722 | | |
706 | 723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
21 | 36 | | |
22 | 37 | | |
23 | 38 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
| 492 | + | |
493 | 493 | | |
494 | | - | |
495 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
| |||
973 | 977 | | |
974 | 978 | | |
975 | 979 | | |
| 980 | + | |
976 | 981 | | |
977 | 982 | | |
978 | 983 | | |
| |||
1016 | 1021 | | |
1017 | 1022 | | |
1018 | 1023 | | |
1019 | | - | |
| 1024 | + | |
1020 | 1025 | | |
1021 | 1026 | | |
1022 | 1027 | | |
| |||
This file was deleted.
0 commit comments