Skip to content

Fix changelog block hiding links for private+skip repos - #3982

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/changelog-block-private-repos-skip
Aug 31, 2026
Merged

Fix changelog block hiding links for private+skip repos#3982
Mpdreamz merged 1 commit into
mainfrom
fix/changelog-block-private-repos-skip

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

ChangelogBlock never hid PR links for the ten private: true, skip: true team repos in assembler.yml (kibana-team, search-team, security-team, and the rest). A local {changelog} render printed their links in plain text.

Affects: Release notes, Authoring

Why

LoadPrivateRepositories populated the hidden-repo set from PrivateRepositories.Keys. That dictionary is built with .Where(r => !r.Value.Skip), which excludes every repo with skip: true. The filter exists for good reason in AssemblerCrossLinkFetcher — a skip: true repo publishes no link index, so fetching cross-links for it would throw. But skip: true means "does not publish docs", not "is public". The two consumers need different subsets of the same snapshot, and they were sharing one.

The :cdn: publication path was already safe — the scrubber strips disallowed refs before a bundle reaches the public bucket. Local renders were the hole.

What

Distinct set for render-time visibility

AssemblyConfiguration gains AllPrivateRepositoryNames — an IReadOnlySet<string> of every repo marked private: true, derived from the pre-removal snapshot without the !Skip filter. The existing PrivateRepositories dictionary and its cross-link consumer are unchanged.

ChangelogBlock uses the right set

LoadPrivateRepositories switches from PrivateRepositories.Keys to AllPrivateRepositoryNames. A repo that is private and skipped now hides its links at render time, matching the scrubber's behaviour at publication time.

Regression test

LoadPrivateRepositories_IncludesSkipTruePrivateRepos asserts that kibana-team — present in the embedded assembler.yml as private: true, skip: true — appears in Block.PrivateRepositories after initialisation. The test failed before this fix.

Verify

dotnet test tests/Elastic.Markdown.Tests/ --filter "ChangelogLinksDefaultBehaviorTests"
# LoadPrivateRepositories_IncludesSkipTruePrivateRepos

`ChangelogBlock.LoadPrivateRepositories` read `PrivateRepositories.Keys`,
which excludes repos with `skip: true` set. That excluded all ten existing
team repos (`kibana-team`, `search-team`, etc.) from render-time link
hiding, so a local `{changelog}` render printed their PR links.

The root cause was that `AssemblyConfiguration.PrivateRepositories` serves
two consumers with different needs:
- `AssemblerCrossLinkFetcher` needs repos whose cross-links can actually be
  fetched; `skip:true` means no link index exists, so the `!Skip` filter is
  correct there.
- `ChangelogBlock` needs repos whose links must be hidden; `skip:true` means
  "does not publish docs", not "is public", so the filter is wrong there.

The fix adds `AllPrivateRepositoryNames` — all repos marked `private: true`
regardless of `skip: true`, derived from the same pre-removal snapshot.
`LoadPrivateRepositories` switches to this set; `PrivateRepositories` and
its cross-link consumer are unchanged.

The `:cdn:` publication path was already safe (the scrubber strips those
refs before publication), but a local bundle render leaked them.

Co-Authored-By: Claude <noreply@anthropic.com>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner August 31, 2026 15:06
@Mpdreamz Mpdreamz added the bug label Aug 31, 2026
@Mpdreamz
Mpdreamz requested a review from reakaleek August 31, 2026 15:06
@Mpdreamz Mpdreamz added the bug label Aug 31, 2026
@github-actions

Copy link
Copy Markdown

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3982/

@Mpdreamz
Mpdreamz merged commit 92d8613 into main Aug 31, 2026
36 checks passed
@Mpdreamz
Mpdreamz deleted the fix/changelog-block-private-repos-skip branch August 31, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant