Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 100 additions & 100 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]

jobs:
lint-and-format:
name: Lint & Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Run linter
run: pnpm lint

- name: Run formatter check
run: pnpm format

- name: Run type check
run: pnpm check

build:
name: Build Extension
runs-on: ubuntu-latest
needs: lint-and-format

strategy:
matrix:
browser: [chrome, firefox]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Build for ${{ matrix.browser }}
run: |
if [ "${{ matrix.browser }}" = "firefox" ]; then
pnpm build:firefox
else
pnpm build
fi

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: extension-${{ matrix.browser }}
path: .output/${{ matrix.browser == 'firefox' && 'firefox-mv2' || 'chrome-mv3' }}
retention-days: 7
lint-and-format:
name: Lint & Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Run linter
run: pnpm lint

- name: Run formatter check
run: pnpm format

- name: Run type check
run: pnpm check

build:
name: Build Extension
runs-on: ubuntu-latest
needs: lint-and-format

strategy:
matrix:
browser: [chrome, firefox]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Build for ${{ matrix.browser }}
run: |
if [ "${{ matrix.browser }}" = "firefox" ]; then
pnpm build:firefox
else
pnpm build
fi

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: extension-${{ matrix.browser }}
path: .output/${{ matrix.browser == 'firefox' && 'firefox-mv2' || 'chrome-mv3' }}
retention-days: 7
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.{js,ts,svelte}": ["prettier --write", "eslint --fix"],
"*.{json,md,css,html}": ["prettier --write"]
"*.{js,ts,svelte}": ["prettier --write", "eslint --fix"],
"*.{json,md,css,html}": ["prettier --write"]
}
30 changes: 15 additions & 15 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ pnpm build:firefox # For Firefox

**Chrome/Chromium:**

- Open `chrome://extensions/`
- Enable "Developer mode"
- Click "Load unpacked"
- Select the `.output/chrome-mv3` directory
- Open `chrome://extensions/`
- Enable "Developer mode"
- Click "Load unpacked"
- Select the `.output/chrome-mv3` directory

**Firefox:**

- Open `about:debugging#/runtime/this-firefox`
- Click "Load Temporary Add-on"
- Select the `manifest.json` file from `.output/firefox-mv2`
- Open `about:debugging#/runtime/this-firefox`
- Click "Load Temporary Add-on"
- Select the `manifest.json` file from `.output/firefox-mv2`

### Development Mode

Expand All @@ -77,8 +77,8 @@ pnpm dev:firefox # Firefox with hot reload
3. **Click the extension icon** to open the popup
4. **Click "Manage Filters"** to add your first filter
5. **Create a filter** with a name and GitHub search syntax:
- Name: `Hide Dependabot PRs`
- Value: `-author:app/dependabot`
- Name: `Hide Dependabot PRs`
- Value: `-author:app/dependabot`
6. **Save** and refresh the PR page - filter applies automatically!

### Filter Examples
Expand Down Expand Up @@ -106,11 +106,11 @@ See [GitHub's search syntax documentation](https://docs.github.com/en/search-git

### Technology Stack

- **[WXT](https://wxt.dev/)** - Cross-browser extension framework
- **[Svelte 5](https://svelte.dev/)** - Reactive UI framework with runes API
- **[TypeScript](https://www.typescriptlang.org/)** - Type-safe development
- **[Tailwind CSS 4](https://tailwindcss.com/)** - Utility-first styling
- **[Vite](https://vitejs.dev/)** - Fast build tool
- **[WXT](https://wxt.dev/)** - Cross-browser extension framework
- **[Svelte 5](https://svelte.dev/)** - Reactive UI framework with runes API
- **[TypeScript](https://www.typescriptlang.org/)** - Type-safe development
- **[Tailwind CSS 4](https://tailwindcss.com/)** - Utility-first styling
- **[Vite](https://vitejs.dev/)** - Fast build tool

### Project Structure

Expand Down Expand Up @@ -153,24 +153,24 @@ pullscope/

**Filter Store** (`src/lib/stores/filters.ts`)

- Centralized state management
- Automatic sync with browser storage
- Real-time updates across components
- Storage change listener for cross-tab sync
- Centralized state management
- Automatic sync with browser storage
- Real-time updates across components
- Storage change listener for cross-tab sync

**GitHub Integration** (`src/lib/github.ts`)

- Multiple fallback selectors for robustness
- Token-based duplicate detection
- Form submission triggering
- Proper event dispatching
- Multiple fallback selectors for robustness
- Token-based duplicate detection
- Form submission triggering
- Proper event dispatching

**Content Script** (`src/entrypoints/content/GithubPRFilter.svelte`)

- Waits for DOM elements to load
- Debounced URL change handler
- Real-time filter toggle listener
- Toast notifications
- Waits for DOM elements to load
- Debounced URL change handler
- Real-time filter toggle listener
- Toast notifications

## 🤝 Contributing

Expand All @@ -190,9 +190,9 @@ Contributions are welcome! Please feel free to submit a Pull Request.

### Guidelines

- Follow the existing code style
- Use technology standards
- Update documentation as needed
- Follow the existing code style
- Use technology standards
- Update documentation as needed

## 📝 License

Expand All @@ -202,10 +202,10 @@ MIT License - see [LICENSE](LICENSE) file for details

**Guido Dinello**

- GitHub: [@guidodinello](https://github.com/guidodinello)
- Extension ID: `pullscope@guidodinello.dev`
- GitHub: [@guidodinello](https://github.com/guidodinello)
- Extension ID: `pullscope@guidodinello.dev`

## 🙏 Acknowledgments

- Built with [WXT](https://wxt.dev/)
- Template used [oneezy/svelte-5-extension](https://github.com/oneezy/svelte-5-extension)
- Built with [WXT](https://wxt.dev/)
- Template used [oneezy/svelte-5-extension](https://github.com/oneezy/svelte-5-extension)
Loading