Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def handle_open(action)
detail: "No changes after pinning — packages may already be at latest."
)
end
@git.push(branch: spec.branch)
@git.push(branch: spec.branch, force: true)
number = @gh.create_pr(
branch: spec.branch, base: @base,
title: spec.title, body: @body_renderer.call(spec),
Expand Down
2 changes: 1 addition & 1 deletion lib/git_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def commit_all(message:)

def push(branch:, force: false)
argv = ["git", "push", "origin", "#{branch}:#{branch}"]
argv.push("--force-with-lease") if force
argv.push("--force") if force
@runner.run!(*argv)
nil
end
Expand Down
2 changes: 1 addition & 1 deletion test/executor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_open_action_pins_pushes_and_creates_pr
# Git operations: checkout fresh, commit, push.
assert_equal [{branch: "importmap-updates/patch", base: "main"}], @git.checkouts
assert_equal 1, @git.commits.size
assert_equal [{branch: "importmap-updates/patch", force: false}], @git.pushes
assert_equal [{branch: "importmap-updates/patch", force: true}], @git.pushes

# gh create_pr called with planner-provided title and rendered body.
assert_equal 1, @gh.created.size
Expand Down
Loading