-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort les méthodes liées au call à l'API GitHub dans un service séparé #113
Conversation
…extract-github-api-calls * 'principale' of github.com:Scribouilli/scribouilli: Add unit tests (#111)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plutôt très cool dans l'ensemble
Ça ressemble à un taf un peu titanesque !
Grave merci d'avoir fait ça !
Le fichier oauth-services-api/index.js
m'intrigue un peu pour le moment, mais à part ça, cette PR est très cool !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je n'ai pas testé, mais je ne vois rien de bloquant pour merger
C'est une grosse PR structurante, donc ça me va de la merger le plus tôt possible
import './../types.js' | ||
|
||
/** | ||
* @overlaod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
Avec l'intention d'ajouter la connexion et la communication avec GitLab, cette PR prépare le terrain en essayant d'extraire tous les appels qu'on fait à l'API GitHub dans un service séparé.
J'ai repris la logique de
databaseAPI
où on exporte un singleton. L'idée, c'est que ce service soit instancié au chargement de la page en fonction de chez qui on s'est déjà connecté avec les informations qu'on a danslocalStorage
. Dans le cas où il n'y a pas d'info, on est redirigé sur la page de connexion.Il me reste encore à tester entièrement l'application pour vérifier que je n'ai pas cassé de fonctionnalité avec ce refacto. Mais sur les happy path (création de site, ajout de page), ça fonctionne déjà bien.