Skip to content

Commit ecdc355

Browse files
authored
fix: Fix missing pull strategy for simple-git (#72)
Closes #71
1 parent 79fae44 commit ecdc355

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Add a step like this to your workflow:
3838
# Default: 'Commit from GitHub Actions (name of the workflow)'
3939
message: 'Your commit message'
4040

41+
# The flag used on the pull strategy
42+
# Default: '--no-rebase'
43+
pull_strategy: '--no-rebase or --no-ff or --rebase'
44+
4145
# The arguments for the `git rm` command (see the paragraph below for more info)
4246
# Default: ''
4347
remove: "./dir/old_file.js"

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
message:
2323
description: The message for the commit
2424
required: false
25+
pull_stategy:
26+
description: The flag used on the pull strategy
27+
required: false
28+
default: '--no-rebase'
2529
remove:
2630
description: Arguments for the git rm command
2731
required: false

src/inputs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// WARNING: this file is auto-generated by scripts/inputs.ts (npm run inputs), any manual edit will be overwritten.
22

3-
export type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'remove' | 'signoff' | 'tag'
3+
export type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'pull_stategy' | 'remove' | 'signoff' | 'tag'

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ console.log(`Running in ${baseDir}`);
4545
info('> Pulling from remote...')
4646
await git
4747
.fetch(undefined, log)
48-
.pull(undefined, undefined, undefined, log)
48+
.pull(undefined, undefined, [getInput('pull_stategy')], log)
4949

5050
info('> Re-staging files...')
5151
if (getInput('add')) await add({ ignoreErrors: true })

0 commit comments

Comments
 (0)