Skip to content

Commit

Permalink
feat(core): add an option to skip pushing init vote commit (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Jun 1, 2024
1 parent 466c43c commit 7da1c6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/generateNewVoteFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ interface Options {
commitMessage?: string;
commitAuthor?: string;
gpgSign?: boolean | string;
pushToRemote?: boolean
};
}

Expand Down Expand Up @@ -235,6 +236,7 @@ export default async function generateNewVoteFolder(options: Options) {
gpgSign,
commitAuthor,
commitMessage,
pushToRemote = true,
doNotCleanTempFiles,
} = gitOptions;
const spawnArgs = { cwd: directory };
Expand Down Expand Up @@ -263,7 +265,7 @@ export default async function generateNewVoteFolder(options: Options) {
{ spawnArgs }
);

if (repo) {
if (repo && pushToRemote) {
await runChildProcessAsync(GIT_BIN, ["push", repo, `HEAD:${branch}`], {
spawnArgs,
});
Expand Down

0 comments on commit 7da1c6a

Please sign in to comment.