Fixed test imports, added changeset
Signed-off-by: Tavi Nolan <Tavi.Nolan@fmr.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-github': patch
|
||||
---
|
||||
|
||||
Added handling for dry run to githubPullRequest and githubWebhook and added tests for this functionality
|
||||
@@ -41,7 +41,6 @@ import {
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
import { when } from 'jest-when';
|
||||
import { createPublishGithubAction } from './github';
|
||||
import { initRepoAndPush } from '@backstage/plugin-scaffolder-node';
|
||||
import {
|
||||
|
||||
@@ -14,21 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ActionContext,
|
||||
TemplateAction,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
import { createRootLogger } from '@backstage/backend-common';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import {
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { createPublishGithubPullRequestAction } from './githubPullRequest';
|
||||
import { createRootLogger } from '@backstage/backend-common';
|
||||
import {
|
||||
ActionContext,
|
||||
TemplateAction,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
import fs from 'fs-extra';
|
||||
import { createPublishGithubPullRequestAction } from './githubPullRequest';
|
||||
import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
|
||||
// Make sure root logger is initialized ahead of FS mock
|
||||
createRootLogger();
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
serializeDirectoryContents,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
import { Octokit } from 'octokit';
|
||||
import { CustomErrorBase, InputError } from '@backstage/errors';
|
||||
import { InputError, CustomErrorBase } from '@backstage/errors';
|
||||
import { resolveSafeChildPath } from '@backstage/backend-common';
|
||||
import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
||||
import { getOctokitOptions } from './helpers';
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
import { when } from 'jest-when';
|
||||
import { createGithubRepoCreateAction } from './githubRepoCreate';
|
||||
import { entityRefToName } from './gitHelpers';
|
||||
|
||||
|
||||
@@ -14,16 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createGithubWebhookAction } from './githubWebhook';
|
||||
import {
|
||||
ScmIntegrations,
|
||||
DefaultGithubCredentialsProvider,
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
|
||||
import { createGithubWebhookAction } from './githubWebhook';
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
|
||||
const mockOctokit = {
|
||||
rest: {
|
||||
|
||||
Reference in New Issue
Block a user