Octopus/Docs/.octopusignore
Configuration

.octopusignore

Control which files Octopus reviews and indexes. Same syntax as .gitignore.

Quick Start

Create a .octopusignore file at the root of your repository:

.octopusignore
# Generated documentation
docs/generated/**

# Test fixtures and snapshots
tests/fixtures/**
**/__snapshots__/**

# Vendor / third-party code
third-party/**
vendor/**

# Large data files
*.csv
*.parquet
*.sql

Syntax

The file uses the same pattern syntax as .gitignore, powered by the ignore npm package.

PatternMatches
*.csvAll CSV files
docs/**Everything in the docs directory
!docs/API.mdNegate — include this file even if parent is ignored
**/generated/**Any "generated" folder at any depth

Lines starting with # are comments. Blank lines are ignored.

How It Works

During Indexing

When Octopus indexes your repository, it checks for a .octopusignore file. Matched files are never chunked or embedded — they won't appear in code search results or be used as review context.

After a GitHub pull request merges, Octopus reads the rules from the default branch before indexing changed files. If GitHub returns 404 for .octopusignore, the update proceeds without custom rules. If the read fails for any other reason, Octopus stops the update and marks the existing index stale for a full re-index.

Repository tree fetched→
.octopusignore parsed→
Matched files skipped→
Remaining files chunked & embedded

During Review

When reviewing a PR, Octopus filters out diff sections for ignored files. The AI reviewer never sees changes to those files, so it won't comment on them.

PR diff fetched→
.octopusignore parsed→
Ignored file diffs removed→
AI reviews clean diff

Build Artifact Detection

Octopus automatically detects committed build artifacts and dependency folders — even without a .octopusignore file. If your PR includes files from these directories, a critical finding is created:

node_modules/.next/.nuxt/dist/build/__pycache__/.turbo/coverage/.svelte-kit/.output/vendor/

This automatically triggers REQUEST_CHANGES on GitHub, blocking the PR until the artifacts are removed. This check runs on the raw diff before .octopusignore filtering, so it can't be bypassed.

Common Patterns

Monorepo
# Ignore shared configs
.eslintrc.*
prettier.config.*

# Ignore generated types
**/generated/**
**/*.generated.ts

# Ignore migrations (review manually)
**/migrations/**
Frontend
# Ignore bundled assets
public/assets/**
dist/**

# Ignore lockfiles (too noisy)
pnpm-lock.yaml
package-lock.json
bun.lock
Data / ML
# Ignore data files
*.csv
*.parquet
*.h5
*.pkl

# Ignore model checkpoints
checkpoints/**
models/**/*.bin

Provider Support

.octopusignore works across your connected code providers:

GitHub and Forgejo

Fetched via Contents API from the PR's base branch.

GitLab

Fetched via the Repository Files API from the MR's target branch.

Bitbucket

Fetched via Source endpoint from the PR's base branch.

If .octopusignore is absent from the base branch or reads as an empty file, the review proceeds without custom rules. If the repository tree lists the file and Octopus can't read it, Octopus stops the review before sending the diff to the model. You'll see “Review failed during preparation” and can request the review again.