From 13ea7097e1bcf2949fc628a645aaa97cd6203fbd Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 9 May 2026 19:04:23 +0100 Subject: [PATCH] fix(docs): pin gomarkdoc repository URL flags for deterministic output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b944365..dd33362 100644 --- a/Makefile +++ b/Makefile @@ -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)