Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function gitCommits(messages, execaOpts) {
await pReduce(
messages,
async (_, message) =>
(await execa('git', ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'], execaOpts)).stdout
);
return (await gitGetCommits(undefined, execaOpts)).slice(0, messages.length);
}
export async function gitCommits(messages, execaOpts) {
await pReduce(
messages,
async (_, message) =>
(await execa('git', ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'], execaOpts)).stdout
);
return (await gitGetCommits(undefined, execaOpts)).slice(0, messages.length);
}
function flatten(arr) {
return reduce(arr, (a, b) => a.concat(b), []);
}