Skip to content

Commit 001966b

Browse files
committed
Fix emoji output in changelog to exactly two
1 parent 83d0edb commit 001966b

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

docs/development.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ For PowerShellEditor Services, we simply follow semantic versioning, e.g.
9898
generally used directly: it's a library consumed by other projects which
9999
themselves use preview releases for beta testing.
100100

101-
For the VS Code PowerShell Extension, our version follows `vYYYY.MM.X`, that is:
101+
For the VS Code PowerShell Extension, our version follows `vYYYY.M.X`, that is:
102102
current year, current month, and patch version (not day). This is not semantic
103103
versioning because of issues with how the VS Code marketplace and extension
104104
hosting API itself uses our version number. This scheme _does not_ mean we
@@ -137,7 +137,5 @@ use the same code which includes dependencies).
137137

138138
* `Update-Changelog` should verify the version is in the correct format
139139
* `Update-Changelog` could be faster by not downloading _every_ PR
140-
* `Update-Changelog` should use exactly two emoji and in the right order
141140
* `Update-Version` could be run by `Update-Changelog`
142-
* The build should emit an appropriately named VSIX instead of us manually renaming it
143141
* A `Publish-Binaries` function could be written to push the binaries out

tools/ReleaseTools.psm1

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ function Get-Bullets {
3737
'TylerLeonhardt'
3838
)
3939

40-
$LabelEmoji = @{
40+
$IssueEmojis = @{
4141
'Issue-Enhancement' = ''
4242
'Issue-Bug' = '🐛'
4343
'Issue-Performance' = '⚡️'
44+
}
45+
46+
$AreaEmojis = @{
4447
'Area-Build & Release' = '👷'
4548
'Area-Code Formatting' = '💎'
4649
'Area-Configuration' = '🔧'
@@ -81,12 +84,9 @@ function Get-Bullets {
8184
process {
8285
$PullRequests | ForEach-Object {
8386
# Map all the labels to emoji (or use a default).
84-
# NOTE: Whitespacing here is weird.
85-
$emoji = if ($_.labels) {
86-
$LabelEmoji[$_.labels.LabelName] -join ""
87-
} else {
88-
'#️⃣ 🙏'
89-
}
87+
$labels = if ($_.labels) { $_.labels.LabelName } else { "" }
88+
$issueEmoji = $IssueEmojis[$labels] + "#️⃣" | Select-Object -First 1
89+
$areaEmoji = $AreaEmojis[$labels] + "🙏" | Select-Object -First 1
9090

9191
# Get a linked issue number if it exists (or use the PR).
9292
$link = if ($_.body -match $IssueRegex) {
@@ -105,7 +105,7 @@ function Get-Bullets {
105105
}
106106

107107
# Put the bullet point together.
108-
("-", $emoji, "[$link]($($_.html_url))", "-", "$($_.title).", $thanks -join " ").Trim()
108+
("-", $issueEmoji, $areaEmoji, "[$link]($($_.html_url))", "-", "$($_.title).", $thanks -join " ").Trim()
109109
}
110110
}
111111
}
@@ -250,18 +250,18 @@ function Update-Changelog {
250250
.DESCRIPTION
251251
Note that our Git tags and changelog prefix all versions with `v`.
252252
253-
PowerShellEditorServices: version is `x.y.z-preview.d`
253+
PowerShellEditorServices: version is `X.Y.Z-preview`
254254
255255
- PowerShellEditorServices.psd1:
256-
- `ModuleVersion` variable with `'x.y.z'` string, no pre-release info
256+
- `ModuleVersion` variable with `'X.Y.Z'` string, no pre-release info
257257
- PowerShellEditorServices.Common.props:
258-
- `VersionPrefix` field with `x.y.z`
258+
- `VersionPrefix` field with `X.Y.Z`
259259
- `VersionSuffix` field with pre-release portion excluding hyphen
260260
261-
vscode-powershell: version is `yyyy.mm.x-preview`
261+
vscode-powershell: version is `YYYY.M.X-preview`
262262
263263
- package.json:
264-
- `version` field with `"x.y.z"` and no prefix or suffix
264+
- `version` field with `"X.Y.Z"` and no prefix or suffix
265265
- `preview` field set to `true` or `false` if version is a preview
266266
- `name` field has `-preview` appended similarly
267267
- `displayName` field has ` Preview` appended similarly

0 commit comments

Comments
 (0)