Skip to content

Commit

Permalink
comment the release notes action
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid authored Apr 11, 2024
1 parent 36d459d commit fa03f72
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/guarantee-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ jobs:
id: check_changes
shell: pwsh
run: |
Write-Host "Checking for changes in release_notes.md..."
$changedFiles = git diff --name-only ${{ github.event.before }} ${{ github.sha }}
$latestCommitInPR= ${{ github.sha }}
$latestCommitInTargetBranch = ${{ github.event.before }}
# Get list of files changed in this PR
$changedFiles = git diff --name-only latestCommitInTargetBranch $latestCommitInPR
# If `release_notes.md` was modified, the PR passes the validation.
# If it's not modified, fail and instruct author on what to do (either modify it or add 'no-release-notes' label)
Expand All @@ -36,6 +41,6 @@ jobs:
$errorMessage = "This PR does not update `release_notes.md`. If the PR should be included " +
"in the next release's release notes, please update this file. If the PR should not be included, " +
"then please add the label `no-release-notes` to the PR."
Write-Error #errorMessage
Write-Error $errorMessage
exit 1 # Fail the GH action
}

0 comments on commit fa03f72

Please sign in to comment.