mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
CI Build: Use TRAVIS_PULL_REQUEST_SHA to accurately get the commit message (#6024)
This commit is contained in:
+3
-3
@@ -157,9 +157,9 @@ $isPR = $env:TRAVIS_EVENT_TYPE -eq 'pull_request'
|
||||
# For PRs, Travis-ci strips out [ and ] so read the message directly from git
|
||||
if($env:TRAVIS_EVENT_TYPE -eq 'pull_request')
|
||||
{
|
||||
# Get the second log entry body
|
||||
# The first log is a merge for a PR
|
||||
$commitMessage = git log --format=%B -n 1 --skip=1
|
||||
# If the current job is a pull request, the env variable 'TRAVIS_PULL_REQUEST_SHA' contains
|
||||
# the commit SHA of the HEAD commit of the PR.
|
||||
$commitMessage = git log --format=%B -n 1 $env:TRAVIS_PULL_REQUEST_SHA
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user