diff --git a/__tests__/git.test.ts b/__tests__/git.test.ts index 181a5b30..0f7ed7c8 100644 --- a/__tests__/git.test.ts +++ b/__tests__/git.test.ts @@ -6,7 +6,7 @@ import {mkdirP, rmRF} from '@actions/io' import {action, Status} from '../src/constants' import {execute} from '../src/execute' import {deploy, generateBranch, init, switchToBaseBranch} from '../src/git' -import fs from 'fs'; +import fs from 'fs' const originalAction = JSON.stringify(action) @@ -373,13 +373,13 @@ describe('git', () => { name: 'asd', email: 'as@cat' }, - clean: true, + clean: true }) const response = await deploy(action) - - fs.createWriteStream("assets/.nojekyll"); - fs.createWriteStream("assets/CNAME"); + + fs.createWriteStream('assets/.nojekyll') + fs.createWriteStream('assets/CNAME') // Includes the call to generateBranch expect(execute).toBeCalledTimes(12) @@ -406,7 +406,6 @@ describe('git', () => { expect(execute).toBeCalledTimes(18) expect(rmRF).toBeCalledTimes(1) }) - it('should execute commands with clean options, ommits sha commit message', async () => { process.env.GITHUB_SHA = '' diff --git a/src/git.ts b/src/git.ts index d0ff102b..55ef8b97 100644 --- a/src/git.ts +++ b/src/git.ts @@ -91,7 +91,7 @@ export async function generateBranch(action: ActionInterface): Promise { ) await execute(`git reset --hard`, action.workspace, action.silent) await execute( - `git commit --allow-empty -m "Initial ${action.branch} commit"`, + `git commit --no-verify --allow-empty -m "Initial ${action.branch} commit"`, action.workspace, action.silent ) @@ -233,7 +233,7 @@ export async function deploy(action: ActionInterface): Promise { action.silent ) await execute( - `git commit -m "${commitMessage}" --quiet`, + `git commit -m "${commitMessage}" --quiet --no-verify`, `${action.workspace}/${temporaryDeploymentDirectory}`, action.silent ) @@ -262,7 +262,7 @@ export async function deploy(action: ActionInterface): Promise { action.silent ) await execute( - `git commit -m "${commitMessage}" --quiet`, + `git commit -m "${commitMessage}" --quiet --no-verify`, `${action.workspace}/${temporaryDeploymentDirectory}`, action.silent )