Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 39a057e

Browse files
committed
Fix Git gateway init
1 parent 226d37f commit 39a057e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/core/src/backends/git-gateway/implementation.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,13 @@ export default class GitGateway implements BackendClass {
316316
};
317317

318318
if (this.backendType === 'github') {
319-
this.api = new GitHubAPI(apiConfig);
320-
this.backend = new GitHubBackend(this.config, { ...this.options, API: this.api });
319+
this.backend = new GitHubBackend(this.config, { ...this.options });
320+
this.api = new GitHubAPI({
321+
...apiConfig,
322+
getUser: this.backend.currentUser,
323+
getRepo: this.backend.getRepo,
324+
});
325+
this.backend.api = this.api;
321326
} else if (this.backendType === 'gitlab') {
322327
this.api = new GitLabAPI(apiConfig);
323328
this.backend = new GitLabBackend(this.config, { ...this.options, API: this.api });

0 commit comments

Comments
 (0)