From bf9cbdef1273166003e67e3f12e993d75d82665f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 29 Jun 2025 14:03:35 +0900 Subject: [PATCH] `github.event.pull_request.merge_commit_sha` may be empty --- tool/auto-style.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/auto-style.rb b/tool/auto-style.rb index 39e7d14cb9..b673e3d177 100755 --- a/tool/auto-style.rb +++ b/tool/auto-style.rb @@ -11,7 +11,7 @@ class Git def initialize(oldrev, newrev, branch = nil) @oldrev = oldrev - @newrev = newrev + @newrev = newrev.empty? ? 'HEAD' : newrev @branch = branch # GitHub may not fetch github.event.pull_request.base.sha at checkout