Skip to content

Excluding files ​

An excluded file is never read and can produce no comments.

The starting list ​

A repository begins with these patterns already in its exclude list:

text
*.lock
*.min.js
*.min.css
*.generated.*
**/*.d.ts
**/dist/**
**/node_modules/**
package-lock.json
npm-shrinkwrap.json
pnpm-lock.yaml
bun.lockb
go.sum
packages.lock.json
gradle.lockfile
.pnp.cjs
.pnp.loader.mjs
**/.yarn/**
**/build/**
**/out/**
**/.next/**
**/.nuxt/**
**/coverage/**
**/.turbo/**
**/__pycache__/**
**/.venv/**
*.map
*.bundle.js
*.pb.go
*_pb2.py
*_pb2_grpc.py
*.g.dart
*.freezed.dart
zz_generated.*
*_generated.go
**/__snapshots__/**
CHANGELOG.md
*.svg
*.csv
*.sqlite
*.sqlite3
*.sqlite-journal
*.sqlite-wal
*.sqlite-shm

They cover common lock and dependency metadata, build and coverage output, source maps and bundles, generated code, test snapshots, changelogs, SVG/CSV assets, and SQLite databases and sidecar files. Lockfiles from other ecosystems — yarn.lock, Cargo.lock, Gemfile.lock, composer.lock, poetry.lock — already match *.lock.

They are a starting point, not a floor. Every one of them sits in the repository's exclude list where you can see it and delete it. If you have a real source directory named out or coverage, or hand-authored .svg and .csv files you want reviewed, remove the pattern that catches them rather than renaming the directory. CHANGELOG.md is matched by exact, case-sensitive file name at any depth.

The list is also the only thing excluding files: clear it and every file in the pull request is reviewed. If you want the starting patterns back, Add defaults on the settings page restores the ones you have removed without touching anything else you have added.

One thing no setting changes: GitHub provides no diff for binaries and very large files, so those are skipped whatever your list says.

Adding your own ​

On a repository's settings page, add patterns one at a time, or use Edit as text to paste a whole list — one pattern per line — in a single go. Each is a glob, up to 255 characters, and a repository holds at most 200 of them.

Changes apply to the next review; a review already running keeps the patterns it started with.

How matching works ​

Patterns are matched against the file's path relative to the repository root, with two rules worth knowing:

  • A pattern without a / matches the file name at any depth. *.snap excludes src/__snapshots__/Button.snap as well as Button.snap.
  • A pattern with a / matches the full path from the repository root. src/generated/** matches only under that exact directory, so use **/generated/** if it can appear anywhere.

Dotfiles are matched like any other file — * covers .eslintrc too.

Examples ​

GoalPattern
Snapshot tests, anywhere*.snap
A vendored directory at the rootvendor/**
A vendored directory at any depth**/vendor/**
Every SQL migration**/migrations/**
Generated API clients**/api/generated/**
One specific noisy filepackages/db/src/schema/index.ts
All Markdown*.md

Checking what was skipped ​

The review detail page lists every file in the pull request. Skipped files sit in a Skipped group at the bottom of the file list, each labelled with what happened to it:

LabelMeaning
excludedA pattern in the repository's exclude list matched
too largeGitHub gave no diff for the file: a binary, or a file too large
skippedThe file was reviewable but the pull request went past Max files per review

Select the file and the pane on the right says why:

  • Excluded by pattern: **/migrations/** — naming the exact pattern, so you know which entry to remove if you want the file read;
  • No diff available — the file is binary or too large to review.;
  • max_files_exceeded for a file past the file cap.

If a file you expected to be reviewed is missing, this is the first place to look.

The counts also reach the pull request: the review body's footer reads 3 skipped (excluded), or 5 skipped (2 excluded · 3 no diff) when more than one kind was involved.

When everything is excluded ​

A pull request whose files are all excluded still produces a review, and the check run reports success. Because nothing was read, the body is headed ⊘ Recommendation: Nothing to review, over the line Every changed file was excluded by the repository settings or had no reviewable diff., and its merge confidence reads 10.0/10 · High.

A perfect score here means only that no finding was raised — nothing was read. The skipped count in the footer is what tells you that.