|
|
@ -37,14 +37,7 @@ jobs: |
|
|
|
$isPush = "${{github.event_name }}" -eq "push" ? $true : $false |
|
|
|
$isPush = "${{github.event_name }}" -eq "push" ? $true : $false |
|
|
|
$isMaster = $isPush -and $${{ github.ref_name == github.event.repository.master_branch }} |
|
|
|
$isMaster = $isPush -and $${{ github.ref_name == github.event.repository.master_branch }} |
|
|
|
|
|
|
|
|
|
|
|
if ($isPush) { |
|
|
|
$commit_message = $isPush ? (git show -s --format=%B) : (git log -1 --no-merges --pretty=%B) |
|
|
|
$commit_message = (git show -s --format=%B) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
$last_commit = @(Invoke-RestMethod ${{ github.event.pull_request._links.commits.href }})[0] | Select-Object -Last 1 |
|
|
|
|
|
|
|
$commit_message = $last_commit.commit.message |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$commit_title = ($commit_message -split "[\r\n]+")[0] |
|
|
|
$commit_title = ($commit_message -split "[\r\n]+")[0] |
|
|
|
Write-Output "title=$commit_title" >> $env:GITHUB_OUTPUT |
|
|
|
Write-Output "title=$commit_title" >> $env:GITHUB_OUTPUT |
|
|
|
$files_modified = @(git diff --name-only HEAD~1) |
|
|
|
$files_modified = @(git diff --name-only HEAD~1) |
|
|
|