Skip to content
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

Merged
merged 15 commits into from
Nov 27, 2023

Conversation

Ynote
Copy link
Contributor

@Ynote Ynote commented Nov 15, 2023

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 dans localStorage. 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.

Copy link
Contributor

@DavidBruant DavidBruant left a 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 !

assets/scripts/actions/repository.js Outdated Show resolved Hide resolved
assets/scripts/config.js Show resolved Hide resolved
assets/scripts/databaseAPI.js Show resolved Hide resolved
assets/scripts/oauth-services-api/github.js Outdated Show resolved Hide resolved
assets/scripts/oauth-services-api/github.js Outdated Show resolved Hide resolved
assets/scripts/oauth-services-api/index.js Outdated Show resolved Hide resolved
assets/scripts/oauth-services-api/index.js Outdated Show resolved Hide resolved
assets/scripts/oauth-services-api/index.js Outdated Show resolved Hide resolved
assets/scripts/oauth-services-api/index.js Outdated Show resolved Hide resolved
@Ynote Ynote mentioned this pull request Nov 25, 2023
@Ynote Ynote marked this pull request as ready for review November 27, 2023 11:12
Copy link
Contributor

@DavidBruant DavidBruant left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ynote Ynote merged commit aa4eb8c into principale Nov 27, 2023
@Ynote Ynote deleted the extract-github-api-calls branch November 27, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants