From ecdc355d155eb48b09908bf2840df913f80d4bca Mon Sep 17 00:00:00 2001 From: Jose Eduardo Kimura Date: Thu, 29 Oct 2020 08:33:40 +0100 Subject: [PATCH] fix: Fix missing pull strategy for simple-git (#72) Closes #71 --- README.md | 4 ++++ action.yml | 4 ++++ src/inputs.ts | 2 +- src/main.ts | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d06ad88..464a70c 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/action.yml b/action.yml index ca4f052..1337186 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/src/inputs.ts b/src/inputs.ts index 9ae3a1f..b1c9002 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -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' diff --git a/src/main.ts b/src/main.ts index 0db95ce..fc8f4c0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 })