Add logger to checkoutExternalRepository

This commit is contained in:
Robert Brignull 2020-09-01 13:53:59 +01:00
parent 1548b771cb
commit 8a821a9c35
9 changed files with 59 additions and 26 deletions

View file

@ -1,8 +1,9 @@
import * as core from '@actions/core';
import * as toolrunnner from '@actions/exec/lib/toolrunner';
import * as fs from 'fs';
import * as path from 'path';
import { Logger } from './logging';
/**
* Check out repository at the given ref, and return the directory of the checkout.
*/
@ -10,9 +11,10 @@ export async function checkoutExternalRepository(
repository: string,
ref: string,
githubUrl: string,
tempDir: string): Promise<string> {
tempDir: string,
logger: Logger): Promise<string> {
core.info('Checking out ' + repository);
logger.info('Checking out ' + repository);
const checkoutLocation = path.join(tempDir, repository, ref);