File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 25
25
id : check_changes
26
26
shell : pwsh
27
27
run : |
28
+
28
29
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
30
35
31
36
# If `release_notes.md` was modified, the PR passes the validation.
32
37
# If it's not modified, fail and instruct author on what to do (either modify it or add 'no-release-notes' label)
36
41
$errorMessage = "This PR does not update `release_notes.md`. If the PR should be included " +
37
42
"in the next release's release notes, please update this file. If the PR should not be included, " +
38
43
"then please add the label `no-release-notes` to the PR."
39
- Write-Error # errorMessage
44
+ Write-Error $ errorMessage
40
45
exit 1 # Fail the GH action
41
46
}
You can’t perform that action at this time.
0 commit comments