mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Refactor setting commit params
This commit is contained in:
parent
ee482f51bd
commit
ba8309ff9c
2 changed files with 10 additions and 11 deletions
|
@ -100,11 +100,11 @@ export async function createOrUpdateBranch(
|
|||
if (await git.isDirty(true)) {
|
||||
core.info('Uncommitted changes found. Adding a commit.')
|
||||
await git.exec(['add', '-A'])
|
||||
if (signoff == true) {
|
||||
await git.commit(['-m', commitMessage, '-s'])
|
||||
} else {
|
||||
await git.commit(['-m', commitMessage])
|
||||
const params = ['-m', commitMessage]
|
||||
if (signoff) {
|
||||
params.push('--signoff')
|
||||
}
|
||||
await git.commit(params)
|
||||
}
|
||||
|
||||
// Perform fetch and reset the working base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue