adds signoff option to sign off commits
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user