code review: don't pass entire context to file action computation

Signed-off-by: Matt Benson <gudnabrsam@gmail.com>
This commit is contained in:
Matt Benson
2024-10-01 16:25:02 -05:00
committed by blam
parent 368d8db74a
commit fcc073ffd7
@@ -40,7 +40,7 @@ async function getFileAction(
fileInfo: { file: SerializedFile; targetPath?: string },
target: { repoID: string; branch: string },
api: Gitlab,
ctx: { logger: Logger },
logger: Logger,
remoteFiles: Types.RepositoryTreeSchema[],
defaultCommitAction:
| 'create'
@@ -63,7 +63,7 @@ async function getFileAction(
return 'skip';
}
} catch (error) {
ctx.logger.warn(
logger.warn(
`Unable to retrieve detailed information for remote file ${filePath}`,
);
}
@@ -285,7 +285,7 @@ which uses additional API calls in order to detect whether to 'create', 'update'
{ file, targetPath },
{ repoID, branch: targetBranch! },
api,
ctx,
ctx.logger,
remoteFiles,
ctx.input.commitAction,
);