fix: Fix missing pull strategy for simple-git (#72)

Closes #71
This commit is contained in:
Jose Eduardo Kimura
2020-10-29 08:33:40 +01:00
committed by GitHub
parent 79fae44cb3
commit ecdc355d15
4 changed files with 10 additions and 2 deletions

View File

@@ -38,6 +38,10 @@ Add a step like this to your workflow:
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'Your commit message'
# The flag used on the pull strategy
# Default: '--no-rebase'
pull_strategy: '--no-rebase or --no-ff or --rebase'
# The arguments for the `git rm` command (see the paragraph below for more info)
# Default: ''
remove: "./dir/old_file.js"

View File

@@ -22,6 +22,10 @@ inputs:
message:
description: The message for the commit
required: false
pull_stategy:
description: The flag used on the pull strategy
required: false
default: '--no-rebase'
remove:
description: Arguments for the git rm command
required: false

View File

@@ -1,3 +1,3 @@
// WARNING: this file is auto-generated by scripts/inputs.ts (npm run inputs), any manual edit will be overwritten.
export type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'remove' | 'signoff' | 'tag'
export type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'pull_stategy' | 'remove' | 'signoff' | 'tag'

View File

@@ -45,7 +45,7 @@ console.log(`Running in ${baseDir}`);
info('> Pulling from remote...')
await git
.fetch(undefined, log)
.pull(undefined, undefined, undefined, log)
.pull(undefined, undefined, [getInput('pull_stategy')], log)
info('> Re-staging files...')
if (getInput('add')) await add({ ignoreErrors: true })