From 0e80eb58d9fd1bc27a69eb0fc49d5f44167b6216 Mon Sep 17 00:00:00 2001 From: avdim Date: Wed, 8 Dec 2021 18:31:26 +0300 Subject: [PATCH] cleanup after success commit --- dist/index.js | 2 ++ src/create-or-update-branch.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 7d704f067..df98b37f8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -132,6 +132,8 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName params.push('--signoff'); } yield git.commit(params); + git.exec(['reset', '--hard']); + git.exec(['clean', '-f']); } // Perform fetch and reset the working base // Commits made during the workflow will be removed diff --git a/src/create-or-update-branch.ts b/src/create-or-update-branch.ts index 7c2a3ac07..9031a13eb 100644 --- a/src/create-or-update-branch.ts +++ b/src/create-or-update-branch.ts @@ -129,6 +129,8 @@ export async function createOrUpdateBranch( params.push('--signoff') } await git.commit(params) + git.exec(['reset', '--hard']) + git.exec(['clean', '-f']) } // Perform fetch and reset the working base