Skip to content

chore: collapse generated docs files in PR diffs (linguist-generated)#4046

Merged
ArakTaiRoth merged 1 commit into
devfrom
tom/linguist-generated
Jun 19, 2026
Merged

chore: collapse generated docs files in PR diffs (linguist-generated)#4046
ArakTaiRoth merged 1 commit into
devfrom
tom/linguist-generated

Conversation

@twjeffery

Copy link
Copy Markdown
Collaborator

What this does

Marks the committed generated docs files as linguist-generated so GitHub collapses them by default in the Files Changed tab. They stay fully diffable, searchable, and in history. They're just hidden behind a one-click expand so real changes are easier to spot in review.

Two entries in a new .gitattributes:

  • docs/generated/** linguist-generated=true: covers the committed component API JSON today, plus any future generator that commits output under docs/generated/.
  • docs/public/search-index.json linguist-generated=true: the search index, which lives outside docs/generated/.

Scope

Display metadata only. No merge-driver or text/eol attributes. The merge driver stays parked until parallel PRs actually start conflicting on these files.

When you'll see it

GitHub applies linguist-generated from the repo's default branch (dev), so it takes effect once this merges. You won't see any collapse on this PR; it shows up on later PRs whose diffs include a generated file. This PR just adds the rule.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-19 20:40 UTC

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Preview removed

All preview folders cleaned from gh-pages branch.

@vanessatran-ddi vanessatran-ddi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@twjeffery twjeffery requested a review from ArakTaiRoth June 19, 2026 17:46
@ArakTaiRoth ArakTaiRoth merged commit 9c6c124 into dev Jun 19, 2026
6 checks passed
@ArakTaiRoth ArakTaiRoth deleted the tom/linguist-generated branch June 19, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants