-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Enable option to Manage Changelog - Enable setting Labels on PRs created - Updated README.md with documentation for these new features Signed-off-by: Jason Field <jason@avon-lea.co.uk>
- Loading branch information
Showing
11 changed files
with
112 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
function Set-ChangeLog { | ||
param( | ||
[String] | ||
$ChangelogPath, | ||
[String] | ||
$ChangeLogMarker, | ||
[String] | ||
$ChangeLogEntry | ||
) | ||
if (-not (Test-Path $ChangeLogPath)) { | ||
Write-Log -Level WARN -Source 'entrypoint' -Message "Unable to find $ChangeLogPath" | ||
return $null | ||
} | ||
|
||
$changelog = get-content $ChangeLogPath | ||
# Work around case sensitivity | ||
if ($changelog | Where-Object { $_ -like "*$ChangeLogMarker*" }) { | ||
$ChangeLogMarker = $changelog | Where-Object { $_ -like "*$ChangeLogMarker*" } | ||
} | ||
$changeIndex = $changelog.IndexOf($changelogMarker) | ||
|
||
if ($changeIndex -ge 0) { | ||
$changeIndex += 2 | ||
$changelog[$changeIndex] = "$changeLogEntry$($changelog[$changeIndex])" | ||
} | ||
else { | ||
# Find the next title: | ||
$NextSubTitle = ($changelog | Where-Object { $_ -like "## *" })[0] | ||
if ($NextSubTitle) { | ||
# Get the index of that subtitle | ||
$NextSubTitleIndex = $changelog.IndexOf($NextSubTitle) | ||
|
||
$changelog[$NextSubTitleIndex] = "$changelogMarker`n`n$changeLogEntry`n$($changelog[$NextSubTitleIndex])" | ||
} | ||
# Unable to find any subtitle | ||
else { | ||
$changelog[2] = "$changelogMarker`n`n$changeLogEntry`n$($changelog[2])" | ||
} | ||
} | ||
|
||
Set-Content -path $changelogPath -Value $changelog | ||
} | ||
|
||
Export-ModuleMember * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.