Skip to content

Add git-diff exporter for CI changed-pages.json - #3895

Draft
reakaleek wants to merge 5 commits into
mainfrom
cursor/git-diff-exporter
Draft

Add git-diff exporter for CI changed-pages.json#3895
reakaleek wants to merge 5 commits into
mainfrom
cursor/git-diff-exporter

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Why

  • Preview comment jobs guess page URLs from GitHub changed-file paths. Those URLs do not match navigation URLs, path prefixes, or pages that include changed snippets.
  • CI needs a builder-produced list of published page URLs and titles.

What

  • Add an opt-in gitdiff exporter that writes changed-pages.json during isolated builds.
  • Map git changes (or GitHub Actions file lists) onto built pages and include reverse-index entries.
  • Auto-enable the exporter on CI isolated builds.

Notes

  • Merge the matching elastic/docs-actions PR before preview comments use the new artifact.
  • Git failures are soft. The build writes an empty pages array and logs a warning.

Made with Cursor

Preview comments need builder URLs, not guessed paths from GitHub file lists.
new(comparer)[...] is invalid C#. Pass the collection and comparer as separate constructor arguments.
Cover GetChanges, CI file lists, and include mapping without a real .git folder.
dotnet format --verify-no-changes treats a non-static local function as a lint failure.
The page was linked from index.md but not listed in _docset.yml, so --strict CI failed.
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