FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(docs): minor Mintify docs generation fixes by mbevc1 · Pull Request #1139 · kosli-dev/cli · GitHub

/ cli Public

fix(docs): minor Mintify docs generation fixes - #1139

Merged
mbevc1 merged 5 commits into
mainfrom
20260829_docs_fixes
Aug 29, 2026
Merged

fix(docs): minor Mintify docs generation fixes#1139
mbevc1 merged 5 commits into
mainfrom
20260829_docs_fixes

Conversation

mbevc1 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
  • Adjust help text for commands and improve readability and align with changes
  • Properly parse carets in the accordion titles when constructing docs pages

Checklist

github-actions Bot added go Pull requests that update go code fix labels Aug 29, 2026

claude Bot commented Aug 29, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Claude finished @mbevc1's task in 2m 36s —— View job


Review: PR #1139 — fix(docs): minor Mintify docs generation fixes

  • Gather context (diff vs origin/main, prior review threads)
  • Static analysis (go build, go vet, go mod tidy)
  • Review code changes
  • Verify prior review feedback was addressed
  • Post review summary

Static analysis

Check Result
go build ./... ✅ clean
go vet ./... ✅ clean
go mod tidy + git diff --exit-code go.mod go.sum ✅ no drift

⚠️ I could not run go test ./internal/docgen/ — the sandbox in this job denied the go test invocation. The two new tests read as correct against the code at internal/docgen/mintlify.go:118-127, but please confirm they pass in CI before merging.

Prior feedback — all addressed ✅

Thread Status
snapshotAzureApps.go — dropped article ("respects .kosli_ignore file") ✅ now "respects a ^.kosli_ignore^ file"
attestSonar.go — redundant "By default … unless told otherwise", lost consequence ✅ now "SonarQube only searches the project's main branch unless told otherwise, so without this flag the scan cannot be found."
attestJira.go — "unreachable" was inaccurate for the 404 path ✅ now correctly split into three cases

The Jira wording now matches the implementation exactly:

  • "A reachable but wrong base URL still surfaces as a non-existent issue…" → internal/jira/jira.go:135-140 (404 → IssueMissing when credentials weren't rejected)
  • "A base URL that cannot be reached is reported as not confirmed, with the transport error as the reason." → internal/jira/jira.go:131-134 (response == nil, LookupReason set, status stays LookupUnverified)
  • "A credential rejection is likewise detected and reported as not confirmed, with a warning identifying the credentials." → internal/jira/jira.go:136-137

The docgen change

internal/docgen/mintlify.go:120-121 is correctly scoped — only exampleLines[0] (the title) is rewritten, so shell bodies containing ^ (anchors, grep '^foo') are untouched. TestMintlifyExampleUseCasesKeepsCaretsInExampleBody pins that, which is the test I'd most want here. Ordering vs. the existing quote replacement is irrelevant (neither introduces the other's character), so no hazard there.

I confirmed the blast radius is small: kosli create attestation-type is the only example title in the repo containing carets —

cmd/kosli/createAttestationType.go:51:# create/update a custom attestation type with schema and ^jq^ evaluation rules:

I also checked that no golden file or committed doc carries the three reworded help strings, so no fixtures need regenerating.

Non-blocking notes

  1. Does Mintlify render backticks inside title? title on <Accordion> is a plain JSX string attribute, not MDX prose, so `jq` may render with literal backticks rather than as inline code. Either way this is strictly better than a raw ^, so it's not worth blocking — but if you have a preview build handy, eyeballing the create attestation-type page would settle whether strings.ReplaceAll(title, "^", "") reads cleaner. Fix this →

  2. Caret → backtick is now in three places with identical intent: Synopsis (mintlify.go:70), this new line (:121), and sanitizeDescription (:141). A one-line caretsToBackticks helper would stop them drifting. Fix this →

  3. Pre-existing, not introduced here: the accordion title never goes through escapeMintlifyProse, so a title containing < or { would break the MDX build. I grepped and no current title has either character, so this is latent rather than live — flagging only so it isn't a surprise later.

Nice work

  • The docgen fix is minimal and precisely scoped, and it ships with a negative test (body carets preserved) alongside the positive one — that's the pair that actually protects against an over-broad regex-style fix later.
  • The comment on mintlify.go:120 explains the why in one line and matches the style of the adjacent quote-escaping comment.
  • The Jira paragraph went through three rounds and landed on wording that is now provably accurate against all three branches of LookupIssue, rather than a plausible-sounding simplification.

Verdict: LGTM once CI confirms internal/docgen tests pass. No blocking issues.
• branch 20260829_docs_fixes

mbevc1 added the documentation Improvements or additions to documentation label Aug 29, 2026
mbevc1 enabled auto-merge (squash) August 29, 2026 11:31
Comment thread cmd/kosli/snapshotAzureApps.go Outdated
Comment thread cmd/kosli/attestJira.go Outdated
Comment thread cmd/kosli/attestSonar.go Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
github-actions Bot removed the documentation Improvements or additions to documentation label Aug 29, 2026
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Comment thread cmd/kosli/snapshotAzureApps.go Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Comment thread cmd/kosli/attestJira.go Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
mbevc1 merged commit 49f9137 into main Aug 29, 2026
22 checks passed
mbevc1 deleted the 20260829_docs_fixes branch August 29, 2026 12:38
mbevc1 pushed a commit that referenced this pull request Aug 29, 2026
Drop the #1139 references — that number is an unrelated docs PR, not this
bug. Cite #1133, which asked for the version to be passed in rather than
derived from tags in the build.

Trim the rest: the workflow comment carried a paragraph of history that
belongs in the commit message, and "empty means dev+<sha>" was restated in
four places.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqXZamA5LHB3b3hGbBEig1
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

Labels

fix go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL