addressing review comments

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2021-12-23 12:30:48 +00:00
parent b5a69efaad
commit 7d4b4e937c
7 changed files with 20 additions and 25 deletions
+1 -6
View File
@@ -203,11 +203,6 @@ export interface GithubCredentialsProvider {
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}
// @public
export type GithubCredentialsProviderFactory = (
config: GitHubIntegrationConfig,
) => GithubCredentialsProvider;
// @public
export type GithubCredentialType = 'app' | 'token';
@@ -432,7 +427,7 @@ export class SingleInstanceGithubCredentialsProvider
implements GithubCredentialsProvider
{
// (undocumented)
static create: GithubCredentialsProviderFactory;
static create: (config: GitHubIntegrationConfig) => GithubCredentialsProvider;
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}
@@ -22,7 +22,6 @@ import { DateTime } from 'luxon';
import {
GithubCredentials,
GithubCredentialsProvider,
GithubCredentialsProviderFactory,
GithubCredentialType,
} from './types';
@@ -232,7 +231,9 @@ export class GithubAppCredentialsMux {
export class SingleInstanceGithubCredentialsProvider
implements GithubCredentialsProvider
{
static create: GithubCredentialsProviderFactory = config => {
static create: (
config: GitHubIntegrationConfig,
) => GithubCredentialsProvider = config => {
return new SingleInstanceGithubCredentialsProvider(
new GithubAppCredentialsMux(config),
config.token,
-1
View File
@@ -27,7 +27,6 @@ export {
export type {
GithubCredentials,
GithubCredentialsProvider,
GithubCredentialsProviderFactory,
GithubCredentialType,
} from './types';
export { GitHubIntegration, replaceGitHubUrlType } from './GitHubIntegration';
-12
View File
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { GitHubIntegrationConfig } from './config';
/**
* The type of credentials produced by the credential provider.
*
@@ -43,13 +41,3 @@ export type GithubCredentials = {
export interface GithubCredentialsProvider {
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}
/**
* This allows implementations to provide factories to create credential providers
*
* @public
*
*/
export type GithubCredentialsProviderFactory = (
config: GitHubIntegrationConfig,
) => GithubCredentialsProvider;