github.event.pull_request.merge_commit_sha may be empty

This commit is contained in:
Nobuyoshi Nakada 2025-06-29 14:03:35 +09:00
parent 63f6f87e86
commit bf9cbdef12
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465

View file

@ -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