use scm integrations interface rather than implementation
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { GithubCredentials, GithubCredentialsProvider } from './types';
|
||||
import { ScmIntegrations } from '../ScmIntegrations';
|
||||
import { ScmIntegrationRegistry } from '../registry';
|
||||
import { SingleInstanceGithubCredentialsProvider } from './SingleInstanceGithubCredentialsProvider';
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ import { SingleInstanceGithubCredentialsProvider } from './SingleInstanceGithubC
|
||||
export class DefaultGithubCredentialsProvider
|
||||
implements GithubCredentialsProvider
|
||||
{
|
||||
static fromIntegrations(integrations: ScmIntegrations) {
|
||||
static fromIntegrations(integrations: ScmIntegrationRegistry) {
|
||||
const credentialsProviders: Map<string, GithubCredentialsProvider> =
|
||||
new Map<string, GithubCredentialsProvider>();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import {
|
||||
DefaultGithubCredentialsProvider,
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
ScmIntegrationRegistry,
|
||||
} from '@backstage/integration';
|
||||
import { createTemplateAction } from '../../createTemplateAction';
|
||||
import { OctokitProvider } from './OctokitProvider';
|
||||
@@ -26,7 +26,7 @@ import { assertError } from '@backstage/errors';
|
||||
type ContentType = 'form' | 'json';
|
||||
|
||||
export function createGithubWebhookAction(options: {
|
||||
integrations: ScmIntegrations;
|
||||
integrations: ScmIntegrationRegistry;
|
||||
defaultWebhookSecret?: string;
|
||||
githubCredentialsProvider?: GithubCredentialsProvider;
|
||||
}) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import {
|
||||
DefaultGithubCredentialsProvider,
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
ScmIntegrationRegistry,
|
||||
} from '@backstage/integration';
|
||||
import {
|
||||
enableBranchProtectionOnDefaultRepoBranch,
|
||||
@@ -32,7 +32,7 @@ type Permission = 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
||||
type Collaborator = { access: Permission; username: string };
|
||||
|
||||
export function createPublishGithubAction(options: {
|
||||
integrations: ScmIntegrations;
|
||||
integrations: ScmIntegrationRegistry;
|
||||
config: Config;
|
||||
githubCredentialsProvider?: GithubCredentialsProvider;
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user