scripts/codeowners-manifest/README.md
Scripts for generating and caching CODEOWNERS manifest data.
Each of these scripts can be run individually if needed, but index.js is most useful because it combines them all.
# Combined script
node index.js # Generate complete manifest with caching
# Individual scripts
node metadata.js # Generate metadata with hashes
node raw.js # Generate raw audit data
node generate.js # Process raw data into manifest files
index.jsflowchart TD
A[index.js] --> B[metadata.js: Generate new metadata]
B --> C{Existing metadata exists?}
C -->|No| D[Generate all files]
C -->|Yes| E{Hashes match?}
E -->|No| D
E -->|Yes| F[Skip generation]
D --> G[raw.js: Generate audit data]
G --> H[generate.js: Process into JSON files]
H --> I[Save new metadata]
I --> J[Complete]
F --> J
style F fill:#e1f5fe
style J fill:#e8f5e8
By default these scripts will write the following files to the /codeowners-manifest/* directory.
audit-raw.jsonl - Raw CODEOWNERS audit data in JSONL format (for fast stream processing)teams.json - List of all codeowners (for validating codeowner names)teams-by-filename.json - Files mapped to their respective codeownersfilenames-by-team.json - Codeowners mapped to their respective filesmetadata.json - Hashes for cache validationFor a list of excluded paths and filenames, see jest.config.codeowner.js.