fix!: remove pull_strategy

This commit is contained in:
Federico Grandi
2021-12-03 21:44:12 +01:00
parent 52d096458a
commit 7d7466136c
4 changed files with 4 additions and 18 deletions

View File

@@ -46,12 +46,6 @@ inputs:
pull:
description: Arguments for the git pull command. Use NO-PULL to avoid the action pulling at all.
required: false
# Default value currently set in runtime
# default: '--no-rebase'
pull_strategy:
description: The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all.
required: false
deprecationMessage: The 'pull_strategy' input is deprecated, please use 'pull'
push:
description: Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (more info in the README)
required: false

2
lib/index.js generated

File diff suppressed because one or more lines are too long

View File

@@ -78,9 +78,7 @@ core.info(`Running in ${baseDir}`)
created a new branch, it will use --rebase when the branch already existed
*/
const pull =
getInput('pull') ||
getInput('pull_strategy') ||
(branchType == 'new' ? 'NO-PULL' : '--no-rebase')
getInput('pull') || (branchType == 'new' ? 'NO-PULL' : '--no-rebase')
if (pull == 'NO-PULL') core.info('> Not pulling from repo.')
else {
core.info('> Pulling from remote...')
@@ -372,13 +370,8 @@ async function checkInputs() {
)
// #endregion
// #region pull, pull_strategy [deprecated]
if (getInput('pull') && getInput('pull_strategy'))
throw new Error(
"You can't use both pull and pull_strategy as action inputs. Please remove pull_strategy, which is deprecated."
)
if ([getInput('pull'), getInput('pull_strategy')].includes('NO-PULL'))
// #region pull
if (getInput('pull') == 'NO-PULL')
core.debug("NO-PULL found: won't pull from remote.")
// #endregion

View File

@@ -17,7 +17,6 @@ interface InputTypes {
message: string
pathspec_error_handling: 'ignore' | 'exitImmediately' | 'exitAtEnd'
pull: string | undefined
pull_strategy: string | undefined
push: string
remove: string | undefined
tag: string | undefined