fix(docs): pin gomarkdoc repository URL flags for deterministic output

CI run 25607949051 failed on the codegen-clean diff check. gomarkdoc
auto-detects the GitHub repository URL from local git config — locally
on a full clone with origin set, it generates source-line links
([func Foo](https://github.com/.../blob/main/...#L4590)); on the CI
runner's fresh checkout, the remote info isn't available the same way
and gomarkdoc emits unlinked headings (## func Foo). The committed
docs (with links) and CI-regenerated docs (without links) diverged,
breaking the gate.

Pin the URL, branch, and path explicitly via gomarkdoc flags so output
is identical regardless of where it runs.
This commit is contained in:
2026-05-09 19:04:23 +01:00
parent f899cc2663
commit 13ea7097e1
+5 -1
View File
@@ -82,7 +82,11 @@ DOC_PACKAGES := \
docs:
@which gomarkdoc > /dev/null || (echo "installing gomarkdoc..." && $(GO) install github.com/princjef/gomarkdoc/cmd/gomarkdoc@v1.1.0)
gomarkdoc -o 'docs/reference/{{.Dir}}.md' $(DOC_PACKAGES)
gomarkdoc \
--repository.url=https://github.com/lukaszraczylo/go-telegram \
--repository.default-branch=main \
--repository.path=/ \
-o 'docs/reference/{{.Dir}}.md' $(DOC_PACKAGES)
docs-check: docs
@git diff --exit-code docs/reference/ || (echo "docs/reference/ is stale — run 'make docs' and commit" && exit 1)