A Chrome extension that automatically marks generated files as "Viewed" on GitHub PR's Files changed page. Works on both Files changed and Changes tabs.
You can configure patterns for auto-viewed files. Default is empty — you need to add patterns yourself.
*/gen/*— Files whose path containsgen*openapi.gen.d.ts— Specific generated file*.lock— Lock filessrc/generated/*— Files under a specific directory*.pb.go— Protocol Buffers generated files
Click the extension icon to open the popup and edit the auto-viewed patterns.
Global tab: Patterns applied to all repositories.
Repository tab: Patterns applied only to the current repository (the PR page you have open). If you open the popup from a non-PR page, you'll see "Open a GitHub Pull Request page to configure repository-specific patterns."
Common:
- One pattern per line
- Use
*as wildcard (glob-style) - Settings are stored in
chrome.storage.syncand sync across devices when signed into Chrome
- Open
chrome://extensions - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the
github-auto-viewedfolder
Click the reload icon on the extension card or press Ctrl+R (Mac: Cmd+R) on the card.
- If it doesn't work, check Console logs prefixed with
[auto-viewed] - If you see
No diff containers found, GitHub's DOM may have changed — update the selectors incontentScript.js
GitHub PRの「Files changed」画面で、生成ファイルを自動的に「Viewed」にするChrome拡張。Files changed または Changes タブで動作します。
以下のようなパターンで、自動Viewedの対象を設定できます(デフォルトは空。ユーザーが設定する必要があります)。
*/gen/*— パスにgenを含むファイル*openapi.gen.d.ts— 特定の生成ファイル*.lock— ロックファイルsrc/generated/*— 特定ディレクトリ配下*.pb.go— Protocol Buffers の生成ファイル
拡張アイコンをクリックするとポップアップが開き、自動Viewedの対象パターンを編集できます。
Global タブ: 全リポジトリに適用されるパターンを設定します。
Repository タブ: 現在開いている GitHub PR のリポジトリにのみ適用されるパターンを設定します。
PR ページ以外でポップアップを開いた場合は「Open a GitHub Pull Request page to configure...」と表示され、設定できません。
共通:
- 1行に1パターン
*をワイルドカードとして使用(glob風)- 設定は
chrome.storage.syncに保存され、Chromeアカウントでログインしていればデバイス間で同期されます
chrome://extensionsを開く- 右上の「デベロッパーモード」をONにする
- 「パッケージ化されていない拡張機能を読み込む」をクリック
github-auto-viewedフォルダを選択
chrome://extensions で本拡張の更新ボタン(リロードアイコン)をクリック、またはカード上で Ctrl+R。
- 動作しない場合、DevTools Console で
[auto-viewed]のログを確認 No diff containers foundと出る場合、GitHub側のDOM構造が変わった可能性がある。contentScript.jsのセレクタを更新する
