github-auto-viewed

GitHub Auto Viewed

A Chrome extension that marks pull request files as viewed when their paths match wildcard patterns, so you can skip straight to the files that need review.

Add *Test.php, open a pull request’s Files changed tab, and every test file is checked off.

Install

  1. Open chrome://extensions.
  2. Turn on Developer mode.
  3. Click Load unpacked and select this folder.

You need to be signed in to GitHub, because GitHub only shows the Viewed checkbox to signed-in users.

Usage

Click the extension icon and enter your patterns, one per line. Click Save patterns (or press ⌘+Enter / Ctrl+Enter) to apply them. Patterns sync across your Chrome profiles. Edits you haven’t saved never affect a pull request, so a half-typed pattern like * can’t mark everything.

Patterns

Syntax Meaning
* Any characters except /
** Any characters, across folders
? One character except /
{a,b} Either a or b
# ... Comment, ignored

A pattern without a / matches the file name in any folder. A pattern with a / matches the full path from the repository root. A trailing / matches everything in that folder.

Pattern Matches Doesn’t match
*Test.php tests/Unit/UserTest.php src/Tester.php
tests/ tests/Feature/Api/EntryTest.php src/tests/helper.php
src/**/*.php src/a.php, src/x/y/a.php lib/a.php
*.{lock,snap} composer.lock, ui/__snapshots__/a.snap package.json
/composer.lock composer.lock packages/x/composer.lock

Matching is case-sensitive, like Git paths.

How it works

The extension runs on github.com pages and only acts on a pull request’s Files changed tab. GitHub gives every file in a diff an anchor of diff- followed by the SHA-256 of its path. The extension reads each file’s path from the page and checks it against that hash before marking it. This works on both GitHub diff views, and the extension never marks a file it read the wrong path for.

Permissions

Nothing is sent anywhere. The extension makes no network requests of its own.

Releasing

  1. Push your changes to main.
  2. On GitHub, open Actions > Release > Run workflow, enter the version (for example 1.2.0) and run it. From a terminal: gh workflow run release.yml -f version=1.2.0.
  3. The workflow checks that the version is new and not lower than the current one, sets it in manifest.json (a chore: release v1.2.0 commit by github-actions[bot], only if the version changed), tags v1.2.0, builds the store zip, and publishes a GitHub release with the zip attached and notes generated from the commits.
  4. Download the zip from the release and upload it in the Chrome Web Store developer dashboard (Package > Upload new package), then submit it for review.

Only extension files go into the zip: anything marked export-ignore in .gitattributes (docs and CI config) is left out.

Files

File Purpose
manifest.json Extension manifest (Manifest V3)
glob.js Wildcard pattern matcher, shared by the popup and content script
content.js Finds matching files on the page and marks them as viewed
popup.html, popup.css, popup.js Settings, and the buttons that mark and unmark files
.github/workflows/release.yml Release workflow: sets the version, tags, and publishes a GitHub release with the zip