fix: use docs site paths for command reference See also links - #642
Conversation
The generated command reference "See also" links pointed to bare slugs (e.g. slack_app_delete) that do not resolve on the docs site. Emit absolute docs site paths (/tools/slack-cli/reference/commands/<name>/) matching the convention used in the hand-authored reference docs. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #642 +/- ##
==========================================
+ Coverage 72.26% 72.34% +0.07%
==========================================
Files 238 238
Lines 20072 20072
==========================================
+ Hits 14505 14521 +16
+ Misses 4298 4279 -19
- Partials 1269 1272 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
@lukegalbraithrussell Thanks immense for catching this 🤓
Before merging it'd be great to add a few tests to prevent regressing on this logic but no blocker!
Add Test_commandDocsURL for the link helper and Test_genMarkdownCommand to guard that the "See also" section emits docs site paths for both the parent and child links rather than bare slugs. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
@zimeg Added some unit tests! |
zimeg
left a comment
There was a problem hiding this comment.
@lukegalbraithrussell Thanks for bringing this to better paths! LGTM!
| }) | ||
| } | ||
|
|
||
| func Test_commandDocsURL(t *testing.T) { |
There was a problem hiding this comment.
🧪 🏆 praise: Thanks for keeping this confident!
🎁 note: I'm unsure if docgen or the internal docs package is better for these patterns and test but for now it's no blocker!
| } | ||
| } | ||
|
|
||
| func Test_genMarkdownCommand(t *testing.T) { |
There was a problem hiding this comment.
👁️🗨️ note: I'm more curious if this can be added to an existing test case above but we can keep this in mind for ongoing changes too.
Summary
The generated command reference "See also" links pointed to bare slugs (e.g.
slack_app_delete) that do not properly resolve on the docs site, thus dead-linking.This changes
docgento emit absolute docs site paths (/tools/slack-cli/reference/commands/<name>/), matching the link convention already used in the hand-authored reference docs (e.g.docs/reference/experiments.md).Changes
commandsDocsURLPathconstant andcommandDocsURL()helper incmd/docgen/docgen.go.slack docgen ./docs/reference.🤖 Generated with Claude Code