-
Notifications
You must be signed in to change notification settings - Fork 510
Changelog tools #1961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changelog tools #1961
Conversation
} | ||
} | ||
|
||
filter GetHumanishRepositoryDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm familiar with "commitish" but not "humanish". Thx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aggravatingly they use the terms in passing and you have to sift through StackOverflow to decode them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff here!
Oh? |
Ah that's because I accidentally deleted the branch! |
Ok here's the kinds of PR this opens: A few notes:
The changelog script also separates the changelog into sections if any PRs close categorised issues (e.g. Area-PSReadLine). Again we can easily add to this with PR labels too. |
tools/changelog/updateChangelog.ps1
Outdated
Get-ChangeInfoFromCommit -GitHubToken $GitHubToken | | ||
Skip-IgnoredChange @ignore | | ||
New-ChangelogEntry @clEntryParams | | ||
New-ChangelogSection @clSectionParams -Preamble "#### [$psesRepoName](https://github.com/$Organization/$psesRepoName)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSES does not have this Preamble
} | ||
} | ||
|
||
filter New-ChangelogEntry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how important making Codacy green is here, but could add something like: [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Justification="We're not actually changing system state.")]
to suppress it complaining about failing the PSSA rule...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ironically there are much more dangerous methods in the GitHubTools.psm1 module that it misses. PSScriptAnalyzer has some weird bits in it frankly -- I'd love to make it more logical.
|
||
if ($CloneBranch) | ||
{ | ||
Write-Verbose "Cloned branch: $CloneBranch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be after the exec?
tools/changelog/updateChangelog.ps1
Outdated
@@ -6,22 +6,55 @@ | |||
using module ..\GitHubTools.psm1 | |||
using module ..\ChangelogTools.psm1 | |||
|
|||
<# | |||
.EXAMPLE | |||
.\updateChangelog.ps1 -GitHubToken $ghTok -PSExtensionSinceRef v2.0.0-preview.3 -PsesSinceRef v2.0.0-preview.3 -PSExtensionVersion 2019.5.0 -PsesVersion 1.12.2 -PSExtensionUntilRef legacy/1.x -PsesUntilRef legacy/1.x -Verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this example. You have a mix of preview and legacy?
RepositoryPath = $PsesRepositoryPath | ||
Verbose = $VerbosePreference | ||
} | ||
|
||
$clEntryParams = @{ | ||
EntryCategories = $categories | ||
DefaultCategory = $defaultCategory | ||
TagLabels = @{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💙
$psesChangelogPostamble = ($psesChangelogSection -split "`n") | ||
$psesChangelogPostamble = $psesChangelogPostamble[2..$psesChangelogPostamble.Length] | ||
$psesChangelogPostamble = $psesChangelogSection -split "`n" | ||
$psesChangelogPostamble = @("#### [$psesRepoName](https://github.com/$Organization/$psesRepoName)") + $psesChangelogPostamble[2..($psesChangelogPostamble.Length-3)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice if you added a small comment about these numbers ( 2 and 3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just a couple questions. Maybe do one test of this from a newly cloned PowerShell/vscode-powershell and PowerShell/PowerShellEditorServices
Co-Authored-By: rjmholt <[email protected]>
0185713
to
f5e6c8b
Compare
Adds changelog generation tools to the repo.
The module has some slightly opinionated things about generating a changelog for any repo, and the script generates changelogs for PowerShellEditorServices and vscode-PowerShell and opens PRs for both of them.
All configurable with labelling etc.