mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
adds signoff option to sign off commits
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
parent
a81d0faef6
commit
ddd52205b6
5 changed files with 16 additions and 4 deletions
|
@ -77,7 +77,8 @@ export async function createOrUpdateBranch(
|
|||
commitMessage: string,
|
||||
base: string,
|
||||
branch: string,
|
||||
branchRemoteName: string
|
||||
branchRemoteName: string,
|
||||
signoff: boolean
|
||||
): Promise<CreateOrUpdateBranchResult> {
|
||||
// Get the working base. This may or may not be the actual base.
|
||||
const workingBase = await git.symbolicRef('HEAD', ['--short'])
|
||||
|
@ -99,7 +100,11 @@ export async function createOrUpdateBranch(
|
|||
if (await git.isDirty(true)) {
|
||||
core.info('Uncommitted changes found. Adding a commit.')
|
||||
await git.exec(['add', '-A'])
|
||||
await git.commit(['-m', commitMessage])
|
||||
if (signoff == true) {
|
||||
await git.commit(['--signoff', '-m', commitMessage])
|
||||
} else {
|
||||
await git.commit(['-m', commitMessage])
|
||||
}
|
||||
}
|
||||
|
||||
// Perform fetch and reset the working base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue