code review: don't mix promise with await

Signed-off-by: Matt Benson <gudnabrsam@gmail.com>
This commit is contained in:
Matt Benson
2024-10-01 16:21:56 -05:00
committed by blam
parent 5b6feba582
commit 368d8db74a
@@ -274,23 +274,23 @@ which uses additional API calls in order to detect whether to 'create', 'update'
);
}
}
const actions: Types.CommitAction[] =
ctx.input.commitAction === 'skip'
? []
: (
(
await Promise.all(
fileContents.map(async file =>
getFileAction(
fileContents.map(async file => {
const action = await getFileAction(
{ file, targetPath },
{ repoID, branch: targetBranch! },
api,
ctx,
remoteFiles,
ctx.input.commitAction,
).then(action => ({ file, action })),
),
);
return { file, action };
}),
)
).filter(o => o.action !== 'skip') as {
file: SerializedFile;