feat!: add commit input (#331)
* fix!: remove `signoff` input * feat: add `commit` input
This commit is contained in:
30
src/main.ts
30
src/main.ts
@@ -97,14 +97,7 @@ core.info(`Running in ${baseDir}`)
|
||||
core.info('> Creating commit...')
|
||||
await git.commit(
|
||||
getInput('message'),
|
||||
undefined,
|
||||
{
|
||||
...(getInput('signoff')
|
||||
? {
|
||||
'--signoff': null
|
||||
}
|
||||
: {})
|
||||
},
|
||||
matchGitArgs(getInput('commit') || ''),
|
||||
(err, data?: CommitSummary) => {
|
||||
if (data) {
|
||||
setOutput('committed', 'true')
|
||||
@@ -404,27 +397,6 @@ async function checkInputs() {
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region signoff
|
||||
if (getInput('signoff')) {
|
||||
const parsed = getInput('signoff', true)
|
||||
|
||||
if (parsed === undefined)
|
||||
throw new Error(
|
||||
`"${getInput(
|
||||
'signoff'
|
||||
)}" is not a valid value for the 'signoff' input: only "true" and "false" are allowed.`
|
||||
)
|
||||
|
||||
if (!parsed) setInput('signoff', undefined)
|
||||
|
||||
core.debug(
|
||||
`Current signoff option: ${getInput('signoff')} (${typeof getInput(
|
||||
'signoff'
|
||||
)})`
|
||||
)
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region github_token
|
||||
if (!getInput('github_token'))
|
||||
core.warning(
|
||||
|
||||
@@ -9,6 +9,7 @@ interface InputTypes {
|
||||
author_email: string
|
||||
branch: string
|
||||
branch_mode: 'throw' | 'create'
|
||||
commit: string | undefined
|
||||
committer_name: string
|
||||
committer_email: string
|
||||
cwd: string
|
||||
@@ -19,7 +20,6 @@ interface InputTypes {
|
||||
pull_strategy: string | undefined
|
||||
push: string
|
||||
remove: string | undefined
|
||||
signoff: undefined
|
||||
tag: string | undefined
|
||||
|
||||
github_token: string | undefined
|
||||
|
||||
Reference in New Issue
Block a user