Skip to content

Commit 5c15f2d

Browse files
authored
Automate Chrome Web Store publishing (#10)
* Add OAuth token refresh utility - Create helper script to simplify getting GitHub refresh tokens - Update release workflow to use semantic versioning - Improve options page styling and token setup flow * Tighten README and update storage docs Condensed README sections to be more skimmable - the accessibility and setup sections were way too verbose. Also updated storage capacity from 100 to 2000 items throughout docs and config since we increased that limit. Added note about NPM registry communication in privacy policy since that's not obvious to users. * Add OAuth script to gitignore * Remove unnecessary web_accessible_resources from manifest
1 parent bb701a6 commit 5c15f2d

10 files changed

Lines changed: 94 additions & 64 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
icons \
5353
shared \
5454
LICENSE \
55-
README.md
55+
README.md \
56+
CHANGELOG.md
5657
5758
- name: Create Release
5859
uses: softprops/action-gh-release@v2
@@ -61,3 +62,13 @@ jobs:
6162
generate_release_notes: true
6263
draft: false
6364
prerelease: false
65+
66+
- name: Publish to Chrome Web Store
67+
uses: mnao305/chrome-extension-upload@v5.0.0
68+
with:
69+
file-path: devwatch-github-v${{ steps.get_version.outputs.VERSION }}.zip
70+
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
71+
client-id: ${{ secrets.CHROME_CLIENT_ID }}
72+
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
73+
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
74+
publish: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ dist/
66
*.zip
77
temp-package/
88
.env
9+
client_secret*.json
10+
scripts/get-refresh-token.js
911
.vscode/
1012
*.crx
1113
*.pem

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Only maintainers can create releases. If you're a maintainer, follow this proces
7777
- Run all tests
7878
- Build the extension
7979
- Create a GitHub release with the zip file
80+
- Automatically publish to Chrome Web Store
8081

8182
### Version Guidelines
8283

PRIVACY.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GitHub Devwatch collects and stores the following data **locally on your device
2929
- Synced across your Chrome browsers if you're signed into Chrome
3030

3131
4. **Activity Data**
32-
- Recent activity from your watched repositories (last 100 items)
32+
- Recent activity from your watched repositories (up to 2000 items)
3333
- Cached locally for offline viewing
3434
- Automatically cleaned up when storage limits are approached
3535

@@ -68,13 +68,22 @@ This extension communicates with GitHub's API (api.github.com) to fetch reposito
6868
- GitHub's privacy policy and terms of service apply to these interactions
6969
- See GitHub's privacy policy at: https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement
7070

71+
### NPM Registry (Optional)
72+
73+
When you add a repository by NPM package name, the extension communicates with the NPM registry (registry.npmjs.org):
74+
75+
- This is entirely optional and only happens when you use the "Add by NPM package" feature
76+
- Used to look up the GitHub repository associated with an NPM package
77+
- No authentication or personal data is sent to NPM
78+
- NPM's privacy policy applies to these interactions
79+
7180
### No Other Third Parties
7281

7382
GitHub Devwatch does **NOT**:
7483
- Use advertising networks
7584
- Use analytics services
7685
- Connect to any servers we operate
77-
- Share data with any third-party services
86+
- Share data with any other third-party services
7887

7988
## Permissions Explained
8089

README.md

Lines changed: 20 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Track GitHub activity across multiple repos. Get notifications for new PRs, issues, and releases without constantly refreshing.
44

5-
[![Chrome Web Store](https://img.shields.io/badge/Chrome-Web_Store-green?logo=google-chrome)](https://chrome.google.com/webstore)
5+
[![Chrome Web Store](https://img.shields.io/badge/Chrome-Web_Store-green?logo=google-chrome)](https://chromewebstore.google.com/detail/github-devwatch/dbgjgcaphfcfgppicmbiafcgcabikjch)
66
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
77
[![CI](https://github.com/jonmartin721/devwatch-github/workflows/CI/badge.svg)](https://github.com/jonmartin721/devwatch-github/actions)
88
[![codecov](https://codecov.io/gh/jonmartin721/devwatch-github/branch/main/graph/badge.svg)](https://codecov.io/gh/jonmartin721/devwatch-github)
@@ -25,11 +25,13 @@ Track GitHub activity across multiple repos. Get notifications for new PRs, issu
2525

2626
### From Chrome Web Store (Recommended)
2727

28-
1. Visit the Chrome Web Store (coming soon)
28+
1. Visit the [Chrome Web Store](https://chromewebstore.google.com/detail/github-devwatch/dbgjgcaphfcfgppicmbiafcgcabikjch)
2929
2. Click "Add to Chrome"
3030
3. Grant permissions when prompted
3131
4. Follow the guided setup wizard on first launch
3232

33+
**GitHub Token Permissions**: You'll need a [Personal Access Token](https://github.com/settings/tokens/new) with `repo` (for private repos) or `public_repo` (for public only).
34+
3335
### Manual Installation (For Development)
3436

3537
1. Clone this repository
@@ -49,19 +51,16 @@ cd devwatch-github
4951
## Quick Setup
5052

5153
### First-Time Setup
52-
When you first install the extension, an **interactive setup wizard** guides you through:
5354

54-
1. **Welcome** - Overview of features and capabilities
55-
2. **GitHub Token** - Create and validate your personal access token with step-by-step instructions
56-
3. **Add Repositories** - Select which repositories to monitor
57-
4. **Activity Preferences** - Choose which types of activity to track (PRs, Issues, Releases)
58-
5. **Done!** - Start monitoring immediately
55+
An interactive wizard guides you through:
56+
1. Create a GitHub token
57+
2. Add repositories to watch
58+
3. Choose activity types (PRs, Issues, Releases)
5959

60-
The entire setup takes about 2 minutes and requires no prior configuration knowledge.
60+
Takes about 2 minutes. No configuration knowledge needed.
6161

6262
<div align="center">
6363
<img src="screenshots/onboarding-welcome.png" alt="Interactive setup wizard welcome screen" width="500">
64-
<br><em>Interactive setup wizard guides you through configuration</em>
6564
</div>
6665

6766
### Ongoing Use
@@ -74,25 +73,13 @@ The entire setup takes about 2 minutes and requires no prior configuration knowl
7473
## How to Use
7574

7675
### Popup Interface
77-
- **Tabs**: Filter between All/PRs/Issues/Releases
78-
- **Search**: Filter activities by keyword
79-
- **Refresh**: Manually check for new activity
80-
- **Archive**: View previously read activities
81-
- **Activity Items**: Click to open in GitHub
76+
Filter by type (All/PRs/Issues/Releases), search activities, refresh manually, or browse the archive. Click any item to open in GitHub.
8277

8378
### Settings Page
84-
- **GitHub Token**: Secure storage of your personal access token
85-
- **Watched Repositories**: Add/remove repositories, import from GitHub
86-
- **Activity Filters**: Choose what types of activity to monitor
87-
- **Feed Management**: Control how long items are stored (up to 2000 items, optional time-based expiry)
88-
- **Check Interval**: Configure how often to check for updates
89-
- **Notifications**: Toggle browser notifications on/off
90-
- **Theme**: Choose dark, light, or system theme
91-
- **Backup/Restore**: Export and import your settings
79+
Manage your GitHub token, watched repositories, activity filters, check interval, notifications, and theme. Export/import settings for backup.
9280

9381
<div align="center">
9482
<img src="screenshots/settings-page.png" alt="Settings page for configuring repositories" width="600">
95-
<br><em>Settings page with repository management</em>
9683
</div>
9784

9885
## Typical Workflow
@@ -110,39 +97,19 @@ The extension keeps up to 2000 items in your local history, so you can always ch
11097

11198
## Accessibility
11299

113-
GitHub Devwatch is built with accessibility in mind to ensure everyone can use it effectively:
114-
115-
### WCAG 2.1 Level A Compliance
116-
- **Form Labels**: All form inputs have proper visible labels for screen readers
117-
- **Keyboard Navigation**: Full keyboard support with intuitive shortcuts
118-
- **Focus Management**: Proper focus indicators and logical tab order
119-
- **ARIA Landmarks**: Semantic HTML with proper ARIA roles and labels
120-
- **Screen Reader Support**: Descriptive labels and live region announcements
121-
122-
### Keyboard Shortcuts
123-
- **R** - Refresh activity
124-
- **S** - Toggle search
125-
- **A** - Toggle archive view
126-
- **Escape** - Close modals and search
127-
- **Arrow Keys** - Navigate between filter tabs
128-
- **Enter/Space** - Activate buttons and links
100+
Full WCAG 2.1 Level A compliance with keyboard navigation, screen reader support, and ARIA landmarks.
129101

130-
### Testing & Validation
131-
- Automated accessibility testing with axe-core
132-
- Manual testing with NVDA and JAWS screen readers
133-
- Keyboard-only navigation verified
134-
- Focus trap implementation in modals
102+
**Keyboard Shortcuts**: R (refresh), S (search), A (archive), Escape (close), Arrow keys (navigate tabs)
135103

136-
For accessibility issues or suggestions, please [open an issue](https://github.com/jonmartin721/devwatch-github/issues).
104+
Tested with NVDA/JAWS screen readers and axe-core. [Report accessibility issues](https://github.com/jonmartin721/devwatch-github/issues).
137105

138106
## Privacy & Security
139107

140-
Your GitHub token is encrypted and stays securely on your machine. The extension only communicates with GitHub's API - no analytics, no tracking, no third-party services.
108+
Your GitHub token is encrypted and stays on your machine. The extension only communicates with GitHub's API - no analytics, no tracking, no third-party services.
141109

142-
- **Encrypted Storage** - Tokens are encrypted using industry-standard AES-GCM encryption and stored locally in Chrome's secure storage with session caching for optimal performance
143-
- **Local Storage Only** - All data stays on your machine, never sent to third-party servers
144-
- **API-Only Communication** - Only talks to GitHub's official API
145-
- **No Third Parties** - Zero external servers or analytics services
110+
- **Encrypted Storage** - Tokens use AES-GCM encryption in Chrome's secure storage
111+
- **Local Only** - All data stays on your machine, never sent to third parties
112+
- **GitHub API Only** - No external servers or analytics services
146113
- **Minimal Permissions** - Token used exclusively for fetching repository activity
147114
- **Open Source** - Review the entire codebase, raise issues, or submit fixes
148115

@@ -225,14 +192,13 @@ Contributions welcome! Submit issues or pull requests. See [CONTRIBUTING.md](CON
225192

226193
## Roadmap
227194

228-
Features I'm considering (no promises on timeline - this is a side project):
195+
This is a side project for me, so I work on it when time allows - but I'd love to see contributions! Here are some features I'm considering:
229196
- **Comment notifications** - Track new comments on issues and PRs
230197
- **Mention tracking** - Get notified when you're mentioned
231198
- **Multiple GitHub accounts** - Switch between different accounts
232-
- **Custom notification filters** - Advanced filtering rules
199+
- **GitHub OAuth** - Simplified authentication with one-click login
233200
- **Internationalization** - Support for multiple languages
234201
- **Dashboard view** - Full-page dashboard for all activity
235-
- **Integration with other platforms** - GitLab, Bitbucket support
236202

237203
If any of these sound useful, open an issue or submit a PR!
238204

options/options.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,35 @@ body.dark-mode .notification-toggle input:checked + .toggle-slider {
13091309
font-weight: 600;
13101310
}
13111311

1312+
.changelog-footer {
1313+
margin-top: 20px;
1314+
padding-top: 16px;
1315+
border-top: 1px solid var(--border-color);
1316+
text-align: center;
1317+
}
1318+
1319+
.changelog-link {
1320+
display: inline-flex;
1321+
align-items: center;
1322+
gap: 8px;
1323+
color: var(--link-color);
1324+
text-decoration: none;
1325+
font-size: 14px;
1326+
font-weight: 500;
1327+
padding: 8px 16px;
1328+
border-radius: 8px;
1329+
transition: all 0.2s ease;
1330+
}
1331+
1332+
.changelog-link:hover {
1333+
background: var(--bg-secondary);
1334+
text-decoration: none;
1335+
}
1336+
1337+
.changelog-link svg {
1338+
flex-shrink: 0;
1339+
}
1340+
13121341
.help-footer {
13131342
margin-top: 48px;
13141343
padding-top: 24px;

options/options.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,19 @@ async function loadVersionAndChangelog() {
10591059

10601060
const changelogContent = document.getElementById('changelogContent');
10611061
if (changelogContent) {
1062-
changelogContent.innerHTML = changelogHtml;
1062+
changelogContent.innerHTML = changelogHtml + `
1063+
<div class="changelog-footer">
1064+
<a href="https://github.com/jonmartin721/devwatch-github/blob/main/CHANGELOG.md"
1065+
target="_blank"
1066+
rel="noopener noreferrer"
1067+
class="changelog-link">
1068+
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true">
1069+
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
1070+
</svg>
1071+
View full changelog on GitHub
1072+
</a>
1073+
</div>
1074+
`;
10631075
}
10641076
} catch (error) {
10651077
console.error('Error loading version/changelog:', error);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const RATE_LIMIT_CONFIG = {
2828
// Storage Configuration
2929
export const STORAGE_CONFIG = {
3030
MAX_WATCHED_REPOS: 50,
31-
MAX_ACTIVITIES_STORED: 100,
31+
MAX_ACTIVITIES_STORED: 2000,
3232
MAX_STORAGE_SIZE: 1024 * 1024, // 1MB
3333
CLEANUP_DAYS: 30, // days to keep old data
3434
STORAGE_QUOTA_CHECK_INTERVAL: 10000 // 10 seconds

shared/state-manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { getSyncItems, getLocalItems } from './storage-helpers.js';
77
import { STORAGE_KEYS, STORAGE_DEFAULTS } from './storage-helpers.js';
8+
import { STORAGE_CONFIG } from './config.js';
89

910
/**
1011
* Centralized state manager with reactive updates
@@ -277,9 +278,8 @@ class StateManager {
277278
const currentActivities = this.getState('allActivities');
278279
const newActivities = [...activities, ...currentActivities];
279280

280-
// Keep only the most recent activities (2000 limit to stay under Chrome storage quota)
281-
const maxActivities = 2000;
282-
const trimmedActivities = newActivities.slice(0, maxActivities);
281+
// Keep only the most recent activities to stay under Chrome storage quota
282+
const trimmedActivities = newActivities.slice(0, STORAGE_CONFIG.MAX_ACTIVITIES_STORED);
283283

284284
await this.setState({ allActivities: trimmedActivities });
285285
}

0 commit comments

Comments
 (0)