Skip to content

Commit

Permalink
cleanup after success commit
Browse files Browse the repository at this point in the history
  • Loading branch information
avdim committed Dec 8, 2021
1 parent 2d4e965 commit 0e80eb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dist/index.js
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/create-or-update-branch.ts
Expand Up @@ -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
Expand Down

0 comments on commit 0e80eb5

Please sign in to comment.