A chrome extension that removes generated files from GitHub's line counts.
The extension uses the Github API to load information about your PR then recalculates the diff, subtracting generated files listed in the repo's .gitattributes file.
pnpm-lock.yaml linguist-generated
vendor/**/* linguist-generated
*.gen.html linguist-generated
-
v1.0.0Subtract a hardcoded list of generated files from PR diffs as POC -
v1.1.0Support private repos via GitHub PAT -
v1.2.0Make the list based off your.gitattributes -
v1.3.0Show the number of generated lines next to additions and subtractions - Recalculate the 5 diff boxes next to the count
- Add a dropdown that lists the files that were counted in the generated line count
That's it. Very simple, targeted extension for fixing 1 problem with GitHub.
You must use Bun with this repo.
Install dependencies:
bun iYou can provide a default API token for development by creating a .env.development.local file:
VITE_DEFAULT_TOKEN=<your-token>This extension is bundled via WXT.
bun dev: Launches Chrome with the dev version of the extension installed.bun run build: Builds the extension for production. Outputs to thedistdirectory.bun run zip: Zips up thedistdirectory into an installable ZIP file.
Add :firefox suffix to some commands to target firefox instead of Chrome.
bun run build:firefoxbun run dev:firefox
Unit tests are written with Vitest.
bun run testUse the Submit for Review workflow.
