Conversation
There was a problem hiding this comment.
Sorry @puneetnith28, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Pull request overview
Adds GitLab support to the extension, aiming to mirror existing GitHub functionality while improving security (XSS sanitization) and adding i18n strings for new UI.
Changes:
- Add GitLab token authentication and pass token into
GitLabHelperfor authenticated requests. - Add GitLab-specific UI (token field, project filtering UI, platform-specific section toggling) and sanitize several UI-rendered strings.
- Extend localization files with new GitLab-related strings across multiple locales.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scripts/scrumHelper.js | Passes stored GitLab token into GitLabHelper, adds GitLab group/project filter parameters, and sanitizes error rendering. |
| src/scripts/popup.js | Adds GitLab token visibility toggle, GitLab project filter UI logic, and sanitizes repository/project rendering. |
| src/scripts/gitlabHelper.js | Adds token-aware request headers, timeouts, centralized error handling, and GitLab group/project filtering in data fetch. |
| src/popup.html | Adds GitLab token/project filter/group inputs and switches platform section visibility to CSS-based toggling. |
| src/index.css | Adds baseline .githubOnlySection / .gitlabOnlySection visibility styles. |
| src/_locales/zh_TW/messages.json | Adds a new locale file including GitLab-related strings. |
| src/_locales/zh_CN/messages.json | Adds GitLab-related strings for Simplified Chinese locale. |
| src/_locales/vi/messages.json | Adds GitLab-related strings for Vietnamese locale. |
| src/_locales/uk/messages.json | Adds GitLab-related strings for Ukrainian locale. |
| src/_locales/te/messages.json | Adds GitLab-related strings for Telugu locale. |
| src/_locales/ru/messages.json | Adds GitLab-related strings for Russian locale. |
| src/_locales/pt_BR/messages.json | Adds GitLab-related strings for Brazilian Portuguese locale. |
| src/_locales/pt/messages.json | Adds GitLab-related strings for Portuguese locale. |
| src/_locales/nb/messages.json | Adds GitLab-related strings for Norwegian Bokmål locale. |
| src/_locales/ja/messages.json | Adds GitLab-related strings for Japanese locale. |
| src/_locales/it/messages.json | Adds GitLab-related strings for Italian locale. |
| src/_locales/id/messages.json | Adds GitLab-related strings for Indonesian locale. |
| src/_locales/hi/messages.json | Adds GitLab-related strings for Hindi locale. |
| src/_locales/he/messages.json | Adds GitLab-related strings for Hebrew locale. |
| src/_locales/fr/messages.json | Adds GitLab-related strings for French locale. |
| src/_locales/es/messages.json | Adds GitLab-related strings for Spanish locale. |
| src/_locales/en/messages.json | Adds GitLab-related strings for English locale. |
| src/_locales/de/messages.json | Adds GitLab-related strings for German locale. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hello @vedansh-5 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/scripts/gitlabHelper.js:331
headersis built fromtokenbut the requests below usethis.getHeaders(token)instead, leavingheadersunused. This dead code is easy to get out of sync (e.g., missing future header allowlisting) — consider removingheadersentirely and relying ongetHeaderseverywhere.
// Update token if provided and build headers
if (token) {
this.token = token;
}
const headers = {};
if (token) {
headers['PRIVATE-TOKEN'] = token;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/scripts/scrumHelper.js:165
- The
chrome.storage.local.get(..., (items) => { ... })callback has a mis-indentedif (outputTarget === 'popup') { ... }closing brace, which makes the control flow hard to follow and increases the risk of future logic errors in this already-complex function. Reformat this block so the closing brace aligns correctly and the subsequent assignments (userReason,githubToken, etc.) are clearly inside the callback.
if (outputTarget === 'popup') {
const usernameFromDOM = document.getElementById('platformUsername')?.value;
const projectFromDOM = document.getElementById('projectName')?.value;
const tokenFromDOM = document.getElementById('githubToken')?.value;
const gitlabTokenFromDOM = document.getElementById('gitlabToken')?.value;
// Save platform-specific username only when non-empty (avoid clearing stored value)
const usernameTrim = (usernameFromDOM || '').trim();
if (usernameTrim) {
chrome.storage.local.set({ [platformUsernameKey]: usernameTrim });
platformUsername = usernameTrim;
platformUsernameLocal = usernameTrim;
}
// apply projectName from DOM immediately in popup mode
items.projectName = projectFromDOM || items.projectName;
// Save platform-specific token (use gitlabToken input when platform is gitlab)
if (platform === 'gitlab') {
items.gitlabToken = gitlabTokenFromDOM || items.gitlabToken;
} else {
items.githubToken = tokenFromDOM || items.githubToken;
}
// Persist projectName and tokens in one call
chrome.storage.local.set({
projectName: items.projectName,
githubToken: items.githubToken,
gitlabToken: items.gitlabToken,
});
}
userReason = items.userReason || 'No Blocker at the moment';
githubToken = items.githubToken;
gitlabToken = items.gitlabToken || '';
yesterdayContribution = items.yesterdayContribution;
if (typeof items.enableToggle !== 'undefined') {
enableToggle = items.enableToggle;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hello @mariobehling @vedansh-5 This PR is ready for review. Please let me know if any further changes are required. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/scripts/gitlabHelper.js:290
fetchGitLabData’s in-flight request handling is broken: the early returnif (this.cache.fetching || ...) return this.cache.data;causes concurrent callers during an active fetch to immediately returnnull/stalecache.data, and makes the later queueing branch (if (this.cache.fetching) { return new Promise(...) }) unreachable. Removethis.cache.fetchingfrom the early-return condition so concurrent calls properly wait on the queued promise (or otherwise share the in-flight request).
if (this.cache.fetching || (this.cache.cacheKey === cacheKey && this.cache.data)) {
return this.cache.data;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vedansh-5
left a comment
There was a problem hiding this comment.
Please pull in the latest changes and resolve conflicts. Thanks.
sure |
Description
Adds full GitLab integration to Scrum Helper, matching existing GitHub functionality with platform-specific enhancements, security fixes, and localization support.
Key Changes
Testing
Screenshot-------------->>>>>>>>>>>>
Closes #270