Skip to content

Commit 12a1230

Browse files
committed
Adding Gitlab Token Authentication
1 parent 6cc9c82 commit 12a1230

23 files changed

+5812
-5029
lines changed

biome.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.4/schema.json",
33
"files": {
4-
"include": ["src/**/*.js", "docs/**"],
5-
"ignore": ["docs/images", "**/*.min.js", "src/icons", "src/materialize", "src/scripts/fontawesome.js"]
4+
"includes": ["src/**/*.js", "docs/**"],
5+
"ignoreUnknown": true
66
},
77
"formatter": {
88
"enabled": true,
@@ -12,12 +12,20 @@
1212
"linter": {
1313
"enabled": true
1414
},
15-
"organizeImports": {
16-
"enabled": true
17-
},
1815
"javascript": {
1916
"formatter": {
2017
"quoteStyle": "single"
2118
}
22-
}
19+
},
20+
"overrides": [
21+
{
22+
"includes": ["docs/images/**", "**/*.min.js", "src/icons/**", "src/materialize/**", "src/scripts/fontawesome.js"],
23+
"linter": {
24+
"enabled": false
25+
},
26+
"formatter": {
27+
"enabled": false
28+
}
29+
}
30+
]
2331
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
"url": "git+https://github.com/fossasia/scrum_helper.git"
88
},
99
"scripts": {
10-
"format": "biome format --write",
10+
"format": "biome format --write .",
1111
"check": "biome check .",
12-
"fix": "biome lint --write"
12+
"fix": "biome check --write .",
13+
"build:css": "npx tailwindcss -c tailwind.config.js -i ./src/index.css -o ./src/tailwindcss.css --minify",
14+
"watch:css": "npx tailwindcss -c tailwind.config.js -i ./src/index.css -o ./src/tailwindcss.css --watch",
15+
"dev": "npm run watch:css"
1316
},
1417
"keywords": [
1518
"scrum",

src/_locales/de/messages.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,65 @@
191191
},
192192
"usernameLabel": {
193193
"message": "Ihr Benutzername"
194+
},
195+
"gitlabTokenLabel": {
196+
"message": "Ihr GitLab-Token"
197+
},
198+
"gitlabTokenPlaceholder": {
199+
"message": "Fügen Sie Ihr GitLab Personal Access Token ein"
200+
},
201+
"gitlabTokenTooltip": {
202+
"message": "<b>Warum wird ein GitLab-Token empfohlen?</b><br>Scrum Helper funktioniert ohne GitLab-Token, aber ein Personal Access Token wird für eine bessere Erfahrung empfohlen. Es erhöht Ihre API-Limits, ermöglicht Zugriff auf private Repos (falls berechtigt) und verbessert Genauigkeit und Geschwindigkeit. Tokens werden lokal gespeichert und nie an uns gesendet.<br><br><b>So erhalten Sie es:</b><br>1. Gehen Sie zu <a href='https://gitlab.com/-/profile/personal_access_tokens' target='_blank' style='color:#2563eb;text-decoration:underline;'>GitLab Token-Einstellungen</a>.<br>2. Klicken Sie auf 'Neuen Token hinzufügen'<br>3. Wählen Sie Scopes: <code>read_api</code> und <code>read_repository</code><br>4. Generieren und hier einfügen.<br><i>Halten Sie Ihr Token geheim!</i>"
203+
},
204+
"testTokenButton": {
205+
"message": "Token testen"
206+
},
207+
"testingTokenButton": {
208+
"message": "Wird getestet..."
209+
},
210+
"tokenValidButton": {
211+
"message": "Gültig!"
212+
},
213+
"tokenInvalidButton": {
214+
"message": "Ungültig"
215+
},
216+
"clearTokenButton": {
217+
"message": "Token löschen"
218+
},
219+
"tokenSecurityNotice": {
220+
"message": "Token wird lokal in Ihrem Browser gespeichert, niemals an Dritte gesendet"
221+
},
222+
"orgNameTooltipGitLab": {
223+
"message": "<b>Welche GitLab-Organisation/Gruppe?</b><br>Geben Sie den Namen der GitLab-Organisation oder -Gruppe ein, um Aktivitäten abzurufen. Lassen Sie das Feld leer, um alle Ihre GitLab-Aktivitäten abzurufen. Der Organisationsname unterscheidet nicht zwischen Groß- und Kleinschreibung."
224+
},
225+
"confirmClearToken": {
226+
"message": "Sind Sie sicher, dass Sie das GitLab-Token löschen möchten?"
227+
},
228+
"tokenAuthError": {
229+
"message": "Authentifizierung fehlgeschlagen. Bitte überprüfen Sie Ihr Token."
230+
},
231+
"tokenPermissionError": {
232+
"message": "Token fehlen erforderliche Berechtigungen. Stellen Sie sicher, dass es den Scope read_api hat."
233+
},
234+
"tokenRateLimitError": {
235+
"message": "Ratenlimit überschritten. Bitte warten Sie und versuchen Sie es erneut."
236+
},
237+
"tokenNetworkError": {
238+
"message": "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung."
239+
},
240+
"tokenTimeoutError": {
241+
"message": "Zeitüberschreitung der Anfrage. Bitte versuchen Sie es erneut."
242+
},
243+
"dataFetchPartialError": {
244+
"message": "Einige Daten konnten nicht abgerufen werden. Ergebnisse könnten unvollständig sein."
245+
},
246+
"notePoint1GitLab": {
247+
"message": "Merge Requests werden basierend auf der letzten Überprüfungsaktivität von beliebigen Mitwirkenden abgerufen, nicht nur Ihren eigenen. Bitte überprüfen und passen Sie den generierten SCRUM-Bericht an, um sicherzustellen, dass er Ihre Arbeit genau widerspiegelt, bevor Sie ihn teilen."
248+
},
249+
"showOpenClosedLabelGitLab": {
250+
"message": "MR-Labels anzeigen"
251+
},
252+
"showCommitsLabelGitLab": {
253+
"message": "Commits bei offenen MRs / Entwurfs-MRs anzeigen"
194254
}
195255
}

src/_locales/en/messages.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@
243243
"message": "Pull requests are fetched based on the most recent review activity by any contributor, not just your own. Please review and adjust the generated SCRUM report to ensure it accurately reflects your work before sharing.",
244244
"description": "First point in the notes section."
245245
},
246+
"notePoint1GitLab": {
247+
"message": "Merge requests are fetched based on the most recent review activity by any contributor, not just your own. Please review and adjust the generated SCRUM report to ensure it accurately reflects your work before sharing.",
248+
"description": "First point in the notes section for GitLab."
249+
},
250+
"showOpenClosedLabelGitLab": {
251+
"message": "Show MRs Labels",
252+
"description": "Label for the checkbox to show MR labels (GitLab)."
253+
},
254+
"showCommitsLabelGitLab": {
255+
"message": "Show commits on open MRs/ draft MRs",
256+
"description": "Label for the checkbox to show commits in open MRs (GitLab)."
257+
},
246258
"noteSeeIssue": {
247259
"message": "See this issue",
248260
"description": "Link text for the GitHub issue in the notes."
@@ -254,5 +266,73 @@
254266
"usernameLabel": {
255267
"message": "Your Username",
256268
"description": "Label for the username input header."
269+
},
270+
"gitlabTokenLabel": {
271+
"message": "Your GitLab Token",
272+
"description": "Label for the GitLab token input."
273+
},
274+
"gitlabTokenPlaceholder": {
275+
"message": "Paste your GitLab Personal Access Token",
276+
"description": "Placeholder for the GitLab token input."
277+
},
278+
"gitlabTokenTooltip": {
279+
"message": "<b>Why is it recommended to add a GitLab token?</b><br>Scrum Helper works without a GitLab token, but adding a personal access token is recommended for a better experience. It raises your API limits, allows access to private repos (if permitted), and improves accuracy and speed. Tokens are stored locally and never sent to us and used only to fetch your git data.<br><br><b>How to obtain:</b><br>1. Go to <a href='https://gitlab.com/-/profile/personal_access_tokens' target='_blank' style='color:#2563eb;text-decoration:underline;'>GitLab Token Settings</a>.<br>2. Click 'Add new token'<br>3. Select scopes: <code>read_api</code> and <code>read_repository</code><br>4. Generate and paste it here.<br><i>Keep your token secret!</i>",
280+
"description": "Tooltip explaining how to get a GitLab token."
281+
},
282+
"testTokenButton": {
283+
"message": "Test Token",
284+
"description": "Button text to test/validate a GitLab token."
285+
},
286+
"testingTokenButton": {
287+
"message": "Testing...",
288+
"description": "Button text while token validation is in progress."
289+
},
290+
"tokenValidButton": {
291+
"message": "Valid!",
292+
"description": "Button text when token is validated successfully."
293+
},
294+
"tokenInvalidButton": {
295+
"message": "Invalid",
296+
"description": "Button text when token validation fails."
297+
},
298+
"clearTokenButton": {
299+
"message": "Clear Token",
300+
"description": "Button text to remove/clear the token."
301+
},
302+
"tokenSecurityNotice": {
303+
"message": "Token stored locally in your browser, never sent to third parties",
304+
"description": "Security notice text below token input."
305+
},
306+
"orgNameTooltipGitLab": {
307+
"message": "<b>Which organization/group's GitLab activity?</b><br>Enter the GitLab organization or group name to fetch activities for. Leave empty to fetch all your GitLab activities across all projects. Organization name is not case-sensitive.",
308+
"description": "Tooltip for organization name when GitLab is selected."
309+
},
310+
"confirmClearToken": {
311+
"message": "Are you sure you want to clear the GitLab token?",
312+
"description": "Confirmation message before clearing the token."
313+
},
314+
"tokenAuthError": {
315+
"message": "Authentication failed. Please check your token.",
316+
"description": "Error message when token authentication fails."
317+
},
318+
"tokenPermissionError": {
319+
"message": "Token lacks required permissions. Ensure it has read_api scope.",
320+
"description": "Error message when token has insufficient permissions."
321+
},
322+
"tokenRateLimitError": {
323+
"message": "Rate limit exceeded. Please wait and try again.",
324+
"description": "Error message when API rate limit is hit."
325+
},
326+
"tokenNetworkError": {
327+
"message": "Network error. Please check your connection.",
328+
"description": "Error message for network issues."
329+
},
330+
"tokenTimeoutError": {
331+
"message": "Request timed out. Please try again.",
332+
"description": "Error message when request times out."
333+
},
334+
"dataFetchPartialError": {
335+
"message": "Some data could not be fetched. Results may be incomplete.",
336+
"description": "Warning when partial data fetch occurs."
257337
}
258338
}

src/_locales/es/messages.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,65 @@
190190
},
191191
"usernameLabel": {
192192
"message": "Su nombre de usuario"
193+
},
194+
"gitlabTokenLabel": {
195+
"message": "Su token de GitLab"
196+
},
197+
"gitlabTokenPlaceholder": {
198+
"message": "Pegue su Token de Acceso Personal de GitLab"
199+
},
200+
"gitlabTokenTooltip": {
201+
"message": "<b>¿Por qué se recomienda agregar un token de GitLab?</b><br>Scrum Helper funciona sin un token de GitLab, pero agregar un token de acceso personal se recomienda para una mejor experiencia. Aumenta sus límites de API, permite el acceso a repos privados (si está permitido) y mejora la precisión y velocidad. Los tokens se almacenan localmente y nunca se envían a nosotros.<br><br><b>Cómo obtenerlo:</b><br>1. Vaya a <a href='https://gitlab.com/-/profile/personal_access_tokens' target='_blank' style='color:#2563eb;text-decoration:underline;'>Configuración de Token de GitLab</a>.<br>2. Haga clic en 'Agregar nuevo token'<br>3. Seleccione ámbitos: <code>read_api</code> y <code>read_repository</code><br>4. Genere y péguelo aquí.<br><i>¡Mantenga su token en secreto!</i>"
202+
},
203+
"testTokenButton": {
204+
"message": "Probar token"
205+
},
206+
"testingTokenButton": {
207+
"message": "Probando..."
208+
},
209+
"tokenValidButton": {
210+
"message": "¡Válido!"
211+
},
212+
"tokenInvalidButton": {
213+
"message": "Inválido"
214+
},
215+
"clearTokenButton": {
216+
"message": "Borrar token"
217+
},
218+
"tokenSecurityNotice": {
219+
"message": "Token almacenado localmente en su navegador, nunca enviado a terceros"
220+
},
221+
"orgNameTooltipGitLab": {
222+
"message": "<b>¿Qué organización/grupo de GitLab?</b><br>Ingrese el nombre de la organización o grupo de GitLab para obtener actividades. Déjelo vacío para obtener todas sus actividades de GitLab. El nombre de la organización no distingue entre mayúsculas y minúsculas."
223+
},
224+
"confirmClearToken": {
225+
"message": "¿Está seguro de que desea borrar el token de GitLab?"
226+
},
227+
"tokenAuthError": {
228+
"message": "Autenticación fallida. Por favor verifique su token."
229+
},
230+
"tokenPermissionError": {
231+
"message": "El token carece de permisos requeridos. Asegúrese de que tenga el ámbito read_api."
232+
},
233+
"tokenRateLimitError": {
234+
"message": "Límite de tasa excedido. Por favor espere e intente nuevamente."
235+
},
236+
"tokenNetworkError": {
237+
"message": "Error de red. Por favor verifique su conexión."
238+
},
239+
"tokenTimeoutError": {
240+
"message": "Tiempo de espera agotado. Por favor intente nuevamente."
241+
},
242+
"dataFetchPartialError": {
243+
"message": "No se pudieron obtener algunos datos. Los resultados pueden estar incompletos."
244+
},
245+
"notePoint1GitLab": {
246+
"message": "Las solicitudes de fusión se obtienen según la actividad de revisión más reciente de cualquier colaborador, no solo la suya. Revise y ajuste el informe SCRUM generado para asegurarse de que refleje con precisión su trabajo antes de compartirlo."
247+
},
248+
"showOpenClosedLabelGitLab": {
249+
"message": "Mostrar etiquetas de MRs"
250+
},
251+
"showCommitsLabelGitLab": {
252+
"message": "Mostrar commits en MRs abiertos / MRs borrador"
193253
}
194254
}

src/_locales/fr/messages.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,65 @@
190190
},
191191
"usernameLabel": {
192192
"message": "Votre nom d'utilisateur"
193+
},
194+
"gitlabTokenLabel": {
195+
"message": "Votre jeton GitLab"
196+
},
197+
"gitlabTokenPlaceholder": {
198+
"message": "Collez votre jeton d'accès personnel GitLab"
199+
},
200+
"gitlabTokenTooltip": {
201+
"message": "<b>Pourquoi est-il recommandé d'ajouter un jeton GitLab ?</b><br>Scrum Helper fonctionne sans jeton GitLab, mais l'ajout d'un jeton d'accès personnel est recommandé pour une meilleure expérience. Il augmente vos limites d'API, permet l'accès aux dépôts privés (si autorisé) et améliore la précision et la vitesse. Les jetons sont stockés localement et ne nous sont jamais envoyés.<br><br><b>Comment l'obtenir :</b><br>1. Allez dans <a href='https://gitlab.com/-/profile/personal_access_tokens' target='_blank' style='color:#2563eb;text-decoration:underline;'>Paramètres de jeton GitLab</a>.<br>2. Cliquez sur 'Ajouter un nouveau jeton'<br>3. Sélectionnez les portées : <code>read_api</code> et <code>read_repository</code><br>4. Générez et collez-le ici.<br><i>Gardez votre jeton secret !</i>"
202+
},
203+
"testTokenButton": {
204+
"message": "Tester le jeton"
205+
},
206+
"testingTokenButton": {
207+
"message": "Test en cours..."
208+
},
209+
"tokenValidButton": {
210+
"message": "Valide !"
211+
},
212+
"tokenInvalidButton": {
213+
"message": "Invalide"
214+
},
215+
"clearTokenButton": {
216+
"message": "Effacer le jeton"
217+
},
218+
"tokenSecurityNotice": {
219+
"message": "Jeton stocké localement dans votre navigateur, jamais envoyé à des tiers"
220+
},
221+
"orgNameTooltipGitLab": {
222+
"message": "<b>Quelle organisation/groupe GitLab ?</b><br>Entrez le nom de l'organisation ou du groupe GitLab pour récupérer les activités. Laissez vide pour récupérer toutes vos activités GitLab. Le nom de l'organisation n'est pas sensible à la casse."
223+
},
224+
"confirmClearToken": {
225+
"message": "Êtes-vous sûr de vouloir effacer le jeton GitLab ?"
226+
},
227+
"tokenAuthError": {
228+
"message": "Échec de l'authentification. Veuillez vérifier votre jeton."
229+
},
230+
"tokenPermissionError": {
231+
"message": "Le jeton manque de permissions requises. Assurez-vous qu'il a la portée read_api."
232+
},
233+
"tokenRateLimitError": {
234+
"message": "Limite de taux dépassée. Veuillez attendre et réessayer."
235+
},
236+
"tokenNetworkError": {
237+
"message": "Erreur réseau. Veuillez vérifier votre connexion."
238+
},
239+
"tokenTimeoutError": {
240+
"message": "Délai d'attente de la requête. Veuillez réessayer."
241+
},
242+
"dataFetchPartialError": {
243+
"message": "Certaines données n'ont pas pu être récupérées. Les résultats peuvent être incomplets."
244+
},
245+
"notePoint1GitLab": {
246+
"message": "Les demandes de fusion sont récupérées en fonction de l'activité de révision la plus récente de n'importe quel contributeur, pas seulement la vôtre. Veuillez examiner et ajuster le rapport SCRUM généré pour vous assurer qu'il reflète fidèlement votre travail avant de le partager."
247+
},
248+
"showOpenClosedLabelGitLab": {
249+
"message": "Afficher les étiquettes des MRs"
250+
},
251+
"showCommitsLabelGitLab": {
252+
"message": "Afficher les commits sur les MRs ouvertes / MRs brouillon"
193253
}
194254
}

0 commit comments

Comments
 (0)