Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cdozdil authored Jan 21, 2025
1 parent c836d95 commit 0fe79fb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,14 @@ jobs:
# Get commit messages excluding .yml file commits
$commits = git log --since="1 day ago" --pretty=format:"%h %s (%an)" --abbrev-commit --grep=".yml" --invert-grep
# Split output into lines if necessary
$commits = $commits -split "`n"
# If no commits are found, cancel the workflow
if (-not $commits) {
if ([string]::IsNullOrEmpty($commits)) {
Write-Output "No relevant commits in the last 24 hours. Cancelling workflow."
exit 0
}
# Join commits into a newline-separated string
$formattedCommits = $commits -join "`n"
# Generate release notes
$releaseNotes = "### Changes in the Last 24 Hours`n`n$formattedCommits"
$releaseNotes = "### Changes in the Last 24 Hours`n`n$commits"
Write-Output "$releaseNotes"
Expand Down

0 comments on commit 0fe79fb

Please sign in to comment.