Update githubRepoPush.ts

Signed-off-by: Nolan, Tavi <Tavi.Nolan@fmr.com>
This commit is contained in:
Nolan, Tavi
2024-04-11 11:20:11 +01:00
committed by Tavi Nolan
parent e381232758
commit d1428a0d36
@@ -14,22 +14,20 @@
* limitations under the License.
*/
import * as inputProps from './inputProperties';
import * as outputProps from './outputProperties';
import { Config } from '@backstage/config';
import { InputError } from '@backstage/errors';
import {
GithubCredentialsProvider,
ScmIntegrationRegistry,
} from '@backstage/integration';
import { Octokit } from 'octokit';
import {
createTemplateAction,
parseRepoUrl,
} from '@backstage/plugin-scaffolder-node';
import { getOctokitOptions, initRepoPushAndProtect } from './helpers';
import { Config } from '@backstage/config';
import { InputError } from '@backstage/errors';
import { Octokit } from 'octokit';
import * as inputProps from './inputProperties';
import * as outputProps from './outputProperties';
import { examples } from './githubRepoPush.examples';
/**
@@ -158,15 +156,6 @@ export function createGithubRepoPushAction(options: {
const remoteUrl = targetRepo.data.clone_url;
const repoContentsUrl = `${targetRepo.data.html_url}/blob/${defaultBranch}`;
if (ctx.isDryRun) {
ctx.logger.info(`Performing dry run of creating pull request`);
ctx.output('remoteUrl', 'www.example.com');
ctx.output('repoContentsUrl', 'www.example.com/content');
ctx.output('commitHash', 'commitHash');
ctx.logger.info(`Dry run complete`);
return;
}
const { commitHash } = await initRepoPushAndProtect(
remoteUrl,
octokitOptions.auth,