Skip to content

Commit 2d0e49a

Browse files
committed
Rename commit_all to commit_changes
1 parent 8efe959 commit 2d0e49a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/executor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def pin_packages_and_commit(spec)
191191
end
192192
end
193193
return false if applied.empty?
194-
@git.commit_all(message: commit_message_for(spec))
194+
@git.commit_changes(message: commit_message_for(spec))
195195
end
196196

197197
def commit_message_for(spec)

lib/git_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def checkout_fresh_branch(branch:, base:)
2929
# Stages all changes and commits with the given message. Returns true
3030
# if a commit was actually created, false if there was nothing to
3131
# commit (which usually means `bin/importmap pin` was a no-op).
32-
def commit_all(message:)
32+
def commit_changes(message:)
3333
@runner.run!("git", "add", "config/importmap.rb", "vendor/javascript")
3434
# `git diff --cached --quiet` exits 0 if there are no staged changes.
3535
diff = @runner.run("git", "diff", "--cached", "--quiet")

test/executor_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def checkout_fresh_branch(branch:, base:)
6464
nil
6565
end
6666

67-
def commit_all(message:)
67+
def commit_changes(message:)
6868
@commits << message
6969
@commit_returns
7070
end
@@ -162,7 +162,7 @@ def test_open_action_pins_pushes_and_creates_pr
162162
def test_open_action_skips_pr_creation_when_pinning_produced_no_changes
163163
# Race condition: the importmap was updated between the planner's read
164164
# and the executor's run, so `bin/importmap pin` is a no-op. The
165-
# `git diff --cached --quiet` step returns true; commit_all returns
165+
# `git diff --cached --quiet` step returns true; commit_changes returns
166166
# false; we abort the open and record a skip.
167167
s = spec(branch: "importmap-updates/patch", packages: [bump("lodash", "4.17.20", "4.17.21")])
168168
@runner.add(pattern: ["bin/importmap", "pin", "lodash@4.17.21"], stdout: "pinned\n")

0 commit comments

Comments
 (0)