Skip to content

Commit 7828c9d

Browse files
committed
Fix update changelog script
1 parent 3190fb8 commit 7828c9d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/update-changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
node-version: '20.x'
2626
- name: Install dependencies
2727
run: npm ci
28-
- name: Update version.json
28+
- name: Update CHANGELOG
2929
run: npx gulp updateChangelog
30-
- name: Create version update PR
30+
- name: Create update PR
3131
uses: peter-evans/create-pull-request@v4
3232
with:
3333
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

66
# 2.94.x
7+
* Update RoslynCopilot url to 18.0.797-alpha (PR: [#8652](https://github.com/OmniSharp/omnisharp-vscode/pull/8652))
8+
* Fix GH action (PR: [#8662](https://github.com/OmniSharp/omnisharp-vscode/pull/8662))
9+
* Adds a new GH action to update the CHANGELOG (PR: [#8658](https://github.com/OmniSharp/omnisharp-vscode/pull/8658))
10+
* Do not run legacy Razor tests in CI (PR: [#8656](https://github.com/OmniSharp/omnisharp-vscode/pull/8656))
11+
* Update third party notices for currently shipped version (PR: [#8653](https://github.com/OmniSharp/omnisharp-vscode/pull/8653))
712
* Bump xamlTools to 18.0.11016.94 (PR: [#8665](https://github.com/dotnet/vscode-csharp/pull/8665))
813
* Bump Roslyn to 5.1.0-1.25475.3 (PR: [#8665](https://github.com/dotnet/vscode-csharp/pull/8665))
914
* Fix index out of bounds producing diagnostic in error recovery scenario (PR: [#80391](https://github.com/dotnet/roslyn/pull/80391))

tasks/snapTasks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ gulp.task('updateChangelog', async (): Promise<void> => {
141141
fs.writeFileSync(changelogPath, changelogLines.join(os.EOL));
142142
});
143143

144-
const prRegex = /^\*.+\(PR: \[#(\d+)\]\(/g;
144+
const prRegex = /^\*.+\(PR: \[#(\d+)\]\(/;
145145

146146
function findNextVersionHeaderLine(changelogLines: string[], startLine: number = 0): [number, string] {
147-
const headerRegex = /^#\s(\d+\.\d+)\.(x|\d+)$/gm;
147+
const headerRegex = /^#\s(\d+\.\d+)\.(x|\d+)$/;
148148
for (let i = startLine; i < changelogLines.length; i++) {
149149
const line = changelogLines.at(i);
150150
const match = headerRegex.exec(line!);
@@ -160,7 +160,7 @@ function getPrIdsBetweenHeaders(changelogLines: string[], startLine: number, end
160160
for (let i = startLine; i < endLine; i++) {
161161
const line = changelogLines.at(i);
162162
const match = prRegex.exec(line!);
163-
if (match && match[1]) {
163+
if (match) {
164164
prs.push(match[1]);
165165
}
166166
}

0 commit comments

Comments
 (0)