Skip to content

Commit fa03f72

Browse files
authored
comment the release notes action
1 parent 36d459d commit fa03f72

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/guarantee-release-notes.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ jobs:
2525
id: check_changes
2626
shell: pwsh
2727
run: |
28+
2829
Write-Host "Checking for changes in release_notes.md..."
29-
$changedFiles = git diff --name-only ${{ github.event.before }} ${{ github.sha }}
30+
$latestCommitInPR= ${{ github.sha }}
31+
$latestCommitInTargetBranch = ${{ github.event.before }}
32+
33+
# Get list of files changed in this PR
34+
$changedFiles = git diff --name-only latestCommitInTargetBranch $latestCommitInPR
3035
3136
# If `release_notes.md` was modified, the PR passes the validation.
3237
# If it's not modified, fail and instruct author on what to do (either modify it or add 'no-release-notes' label)
@@ -36,6 +41,6 @@ jobs:
3641
$errorMessage = "This PR does not update `release_notes.md`. If the PR should be included " +
3742
"in the next release's release notes, please update this file. If the PR should not be included, " +
3843
"then please add the label `no-release-notes` to the PR."
39-
Write-Error #errorMessage
44+
Write-Error $errorMessage
4045
exit 1 # Fail the GH action
4146
}

0 commit comments

Comments
 (0)