DEV: Do not squash commits in version_bump:stage_security_fixes (#23547)

Sometimes fixes will deliberately keep commits separate, and we don't want to undo that
This commit is contained in:
David Taylor
2023-09-12 18:00:42 +01:00
committed by GitHub
parent a32fa3b947
commit 8b51a89919
2 changed files with 7 additions and 6 deletions

View File

@ -406,11 +406,7 @@ task "version_bump:stage_security_fixes", [:base] do |t, args|
git "fetch", origin, origin_branch
first_commit_on_branch = git("log", "--format=%H", "origin/#{base}..#{ref}").lines.last.strip
author = git("log", "-n", "1", "--format=%an <%ae>", first_commit_on_branch).strip
message = git("log", "-n", "1", "--format=%B", first_commit_on_branch).strip
git "merge", "--squash", ref
git "commit", "--author", author, "-m", message
git "cherry-pick", "#{first_commit_on_branch}^..#{ref}"
end
puts "Finished merging commits into a locally-staged #{branch} branch. Git log is:"