Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,21 @@ const accessTokenService = new LockingAccessTokenService(
)
)

export const gitHubClient = new AccessTokenRefreshingGitHubClient(
export const gitHubClient = new GitHubClient({
appId: GITHUB_APP_ID,
clientId: GITHUB_CLIENT_ID,
clientSecret: GITHUB_CLIENT_SECRET,
privateKey: gitHubPrivateKey,
accessTokenReader: accessTokenService
})

const userGitHubClient = new AccessTokenRefreshingGitHubClient(
accessTokenService,
new GitHubClient({
appId: GITHUB_APP_ID,
clientId: GITHUB_CLIENT_ID,
clientSecret: GITHUB_CLIENT_SECRET,
privateKey: gitHubPrivateKey,
accessTokenReader: accessTokenService
})
gitHubClient
)

export const sessionValidator = new GitHubOrganizationSessionValidator(
gitHubClient,
userGitHubClient,
GITHUB_ORGANIZATION_NAME
)

Expand All @@ -93,7 +95,7 @@ export const projectDataSource = new CachingProjectDataSource(
new SessionValidatingProjectDataSource(
sessionValidator,
new GitHubProjectDataSource(
gitHubClient,
userGitHubClient,
GITHUB_ORGANIZATION_NAME
)
),
Expand Down