Skip to content

Commit f0d38ad

Browse files
committed
fix: address reviewer feedback, optimize constructor, and remove workspace noise
1 parent e6a46b9 commit f0d38ad

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/scripts/githubHelper.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* GitHubHelper
33
*
4-
* A reusable service module for GitHub-specific API logic.
5-
* This is the first step toward a generic SCM service layer — mirroring the
6-
* existing GitLabHelper pattern so scrumHelper.js can eventually call either
7-
* platform through a unified interface.
4+
* This extracts GitHub-specific behavior into a helper class and, in the
5+
* browser context, exposes a shared instance plus a backward-compatibility shim.
86
*
97
* Currently extracted: fetchUserRepositories
108
* Planned: fetchData (issues, PRs, user), fetchCommitsForOpenPRs, cache management
@@ -18,7 +16,7 @@ class GitHubHelper {
1816
* @param {object} storage - Storage backend (defaults to browser.storage.local).
1917
* Injected to avoid tight coupling and enable testing without a real browser env.
2018
*/
21-
constructor(storage = browser.storage.local) {
19+
constructor(storage = globalThis.browser?.storage?.local) {
2220
this.storage = storage;
2321
}
2422

0 commit comments

Comments
 (0)