Skip to content

Commit c8a1e04

Browse files
[automated] Merge branch 'main' => 'prerelease' (#8531)
2 parents 47abf88 + cee0c18 commit c8a1e04

File tree

21 files changed

+410
-84
lines changed

21 files changed

+410
-84
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: Release Comment Handler
2+
3+
on:
4+
issues:
5+
types:
6+
- labeled
7+
8+
jobs:
9+
comment_on_label:
10+
if: github.event.label.name == 'prerelease' || github.event.label.name == 'fixed'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
contents: read
15+
steps:
16+
- name: Gather participants
17+
id: participants
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
console.log("=== WORKFLOW START ===");
22+
const issue_number = context.payload.issue.number;
23+
const repo = context.repo;
24+
25+
console.log(`Processing issue #${issue_number} in ${repo.owner}/${repo.repo}`);
26+
27+
// Get issue details (for author)
28+
const issue = context.payload.issue;
29+
const author = issue.user.login;
30+
console.log(`Issue author: ${author}`);
31+
32+
// Use a Set to track all unique participants (normalized to lowercase for deduplication)
33+
const all_participants = new Set();
34+
35+
// Add the issue author
36+
all_participants.add(author.toLowerCase());
37+
console.log(`Added author to participants: ${author.toLowerCase()}`);
38+
39+
// Get all comments and add commenters
40+
console.log("=== FETCHING COMMENTS ===");
41+
const comments = await github.paginate(
42+
github.rest.issues.listComments,
43+
{ ...repo, issue_number }
44+
);
45+
console.log(`Found ${comments.length} comments`);
46+
47+
if (comments.length === 0) {
48+
console.log("❌ NO COMMENTS FOUND - This might be why no users are tagged");
49+
}
50+
51+
comments.forEach((c, index) => {
52+
const commenter = c.user.login.toLowerCase();
53+
all_participants.add(commenter);
54+
console.log(`Comment #${index + 1}: Added commenter: ${commenter} (original: ${c.user.login})`);
55+
});
56+
57+
// Get all reactions from comments
58+
let totalCommentReactions = 0;
59+
for (const comment of comments) {
60+
const reactions = await github.paginate(
61+
github.rest.reactions.listForIssueComment,
62+
{ ...repo, comment_id: comment.id }
63+
);
64+
totalCommentReactions += reactions.length;
65+
reactions.forEach(r => {
66+
const reactor = r.user.login.toLowerCase();
67+
all_participants.add(reactor);
68+
console.log(`Added comment reactor: ${reactor}`);
69+
});
70+
}
71+
console.log(`Processed ${totalCommentReactions} reactions from comments`);
72+
73+
// Get reactions on main issue body
74+
const issue_reactions = await github.paginate(
75+
github.rest.reactions.listForIssue,
76+
{ ...repo, issue_number }
77+
);
78+
console.log(`Found ${issue_reactions.length} reactions on issue body`);
79+
80+
issue_reactions.forEach(r => {
81+
const reactor = r.user.login.toLowerCase();
82+
all_participants.add(reactor);
83+
console.log(`Added issue reactor: ${reactor}`);
84+
});
85+
86+
console.log(`Total unique participants before bot filtering: ${all_participants.size}`);
87+
console.log(`Participants: ${Array.from(all_participants).join(', ')}`);
88+
89+
// Filter out bot users
90+
const isBotUser = (username) => {
91+
const lowerUsername = username.toLowerCase();
92+
return lowerUsername.endsWith('[bot]') ||
93+
lowerUsername === 'dependabot' ||
94+
lowerUsername === 'renovate' ||
95+
lowerUsername === 'greenkeeper' ||
96+
lowerUsername === 'codecov' ||
97+
lowerUsername === 'coveralls' ||
98+
lowerUsername.startsWith('dependabot[') ||
99+
lowerUsername.includes('-bot') ||
100+
lowerUsername.includes('_bot');
101+
};
102+
103+
// Convert Set to array and filter out bots
104+
const all_users = Array.from(all_participants).filter(user => !isBotUser(user));
105+
106+
const filteredBots = Array.from(all_participants).filter(user => isBotUser(user));
107+
console.log(`Filtered out ${filteredBots.length} bot users: ${filteredBots.join(', ')}`);
108+
console.log(`Final participants count: ${all_users.length}`);
109+
console.log(`Final participants: ${all_users.join(', ')}`);
110+
111+
if (all_users.length === 0) {
112+
console.log("No participants to mention after filtering");
113+
const fs = require('fs');
114+
fs.appendFileSync(process.env.GITHUB_ENV, 'MENTIONS=\n');
115+
return;
116+
}
117+
118+
const mentions = all_users.map(u => `@${u}`).join(' ');
119+
console.log(`Generated mentions: ${mentions}`);
120+
console.log(`Setting environment variable 'MENTIONS' to: "${mentions}"`);
121+
122+
const fs = require('fs');
123+
fs.appendFileSync(process.env.GITHUB_ENV, `MENTIONS=${mentions}\n`);
124+
return { mentions: mentions };
125+
result-encoding: string
126+
127+
- name: Add label comment
128+
uses: actions/github-script@v7
129+
with:
130+
script: |
131+
console.log("=== STEP 2: ADD COMMENT ===");
132+
console.log("Environment variable access:");
133+
console.log("process.env.MENTIONS:", process.env.MENTIONS);
134+
135+
const mentions = process.env.MENTIONS || '';
136+
const labelName = context.payload.label.name;
137+
138+
console.log(`Processing label: ${labelName}`);
139+
console.log(`Mentions received: "${mentions}"`);
140+
console.log(`Mentions length: ${mentions.length}`);
141+
console.log(`Mentions trimmed length: ${mentions.trim().length}`);
142+
143+
let message;
144+
145+
if (labelName === 'prerelease') {
146+
console.log("Processing prerelease label");
147+
if (mentions.trim() === "") {
148+
console.log("No participants to mention for prerelease. Skipping comment creation.");
149+
return;
150+
}
151+
message = `${mentions}\n\nA fix for this issue is now available in the next pre-releases of C#DK/C#. If you'd like to try out the fix, please see [these instructions](https://github.com/microsoft/vscode-dotnettools/wiki/Installing-and-updating-pre%E2%80%90release-versions-of-C%23-Dev-Kit-and-C%23-Extension) to update or try pre-release versions.`;
152+
console.log("Generated prerelease message");
153+
} else if (labelName === 'fixed') {
154+
console.log("Processing fixed label");
155+
message = mentions.trim() !== ""
156+
? `${mentions}\n\nThis issue has been fixed! Please update to the latest versions of VS Code, C# Dev Kit, and the C# extension.`
157+
: `This issue has been fixed! Please update to the latest versions of VS Code, C# Dev Kit, and the C# extension.`;
158+
console.log(`Generated fixed message ${mentions.trim() !== "" ? "with" : "without"} mentions`);
159+
}
160+
161+
console.log(`Final message length: ${message.length}`);
162+
console.log(`Creating comment on issue #${context.payload.issue.number}`);
163+
164+
await github.rest.issues.createComment({
165+
...context.repo,
166+
issue_number: context.payload.issue.number,
167+
body: message
168+
});
169+
170+
console.log("Comment created successfully");

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ typings/**
2929
vsix/**
3030
node_modules
3131
azure-pipelines
32+
init.ps1
3233

3334
**/*.map
3435
*.vsix

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

6+
# 2.89.x
7+
* Bump Roslyn to 5.0.0-2.25412.5 (PR: [#8527](https://github.com/dotnet/vscode-csharp/pull/8527))
8+
* Don't try to load file based projects unless we get a .cs file(PR: [#79844](https://github.com/dotnet/roslyn/pull/79844))
9+
* Workaround VSCode's lack of support for case sorting in completion(PR: [#79772](https://github.com/dotnet/roslyn/pull/79772))
10+
* Add messages for when design time builds begin and complete(PR: [#79669](https://github.com/dotnet/roslyn/pull/79669))
11+
* Fix renaming of locals in source generated documents(PR: [#79838](https://github.com/dotnet/roslyn/pull/79838))
12+
* Allow Razor to call into codelens(PR: [#79795](https://github.com/dotnet/roslyn/pull/79795))
13+
* Do not report 'no-effect' warning when active top-level code is updated(PR: [#79746](https://github.com/dotnet/roslyn/pull/79746))
14+
* Register Blazor WASM debugger in Razor Cohosting (PR: [#8511](https://github.com/dotnet/vscode-csharp/pull/8511))
15+
* Bump Razor to 10.0.0-preview.25411.5 (PR: [#8512](https://github.com/dotnet/vscode-csharp/pull/8512))
16+
* Fix VS Code cohosting completion when Razor and C# are valid (PR: [#12096](https://github.com/dotnet/razor/pull/12096))
17+
* Fix null reference exception in formatting (PR: [#12097](https://github.com/dotnet/razor/pull/12097))
18+
* Fix cohost override setting (PR: [#12082](https://github.com/dotnet/razor/pull/12082))
19+
* Cohost span mapping (PR: [#12055](https://github.com/dotnet/razor/pull/12055))
20+
* Explicitly deny certain Roslyn formatting options (PR: [#12064](https://github.com/dotnet/razor/pull/12064))
21+
* Don't use `requestContext` in document closed endpoint (PR: [#12080](https://github.com/dotnet/razor/pull/12080))
22+
* Support `projectPath: '${file}'` (PR: [#8472](https://github.com/dotnet/vscode-csharp/pull/8472))
23+
* Include logs when reporting an issue (PR: [#8503](https://github.com/dotnet/vscode-csharp/pull/8503))
24+
625
# 2.88.x
726
* Enable Razor Cohosting "on" by default (PR: [#8469](https://github.com/dotnet/vscode-csharp/pull/8469))
827
* Bump Roslyn to 5.0.0-2.25405.5 (PR: [#8493](https://github.com/dotnet/vscode-csharp/pull/8493))

SUPPORT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ The template has a section to include the `C#` output window logs. These logs ar
4040

4141
##### C# LSP Trace Logs
4242
- To capture detailed requests sent to the Roslyn language server:
43-
1. Set the `C#` output window log level to `Trace` (as described above).
44-
2. Open the `C# LSP Trace Logs` output window.
43+
1. Open the `C# LSP Trace Logs` output window.
44+
2. Set the output window log level to `Trace`.
4545
3. Reproduce the issue.
4646
4. Copy the contents of the `C# LSP Trace Logs` output window.
47+
5. After collecting the logs, reset the log level to `Info`.
4748

4849

4950
##### Other Ways to Set the Log Level

azure-pipelines.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ stages:
5252
jobs:
5353
- template: azure-pipelines/test-matrix.yml
5454
parameters:
55+
os: linux
5556
# Prefer the dotnet from the container.
5657
dotnetVersion: ''
5758
testVSCodeVersion: $(testVSCodeVersion)
@@ -67,6 +68,7 @@ stages:
6768
jobs:
6869
- template: azure-pipelines/test-matrix.yml
6970
parameters:
71+
os: linux
7072
# Prefer the dotnet from the container.
7173
dotnetVersion: ''
7274
testVSCodeVersion: $(testVSCodeVersion)
@@ -82,6 +84,7 @@ stages:
8284
jobs:
8385
- template: azure-pipelines/test-matrix.yml
8486
parameters:
87+
os: windows
8588
dotnetVersion: $(defaultDotnetVersion)
8689
testVSCodeVersion: $(testVSCodeVersion)
8790
pool:
@@ -94,6 +97,7 @@ stages:
9497
jobs:
9598
- template: azure-pipelines/test-matrix.yml
9699
parameters:
100+
os: macos
97101
dotnetVersion: $(defaultDotnetVersion)
98102
testVSCodeVersion: $(testVSCodeVersion)
99103
pool:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
trigger: none
2+
pr: none
3+
4+
resources:
5+
repositories:
6+
- repository: 1ESPipelineTemplates
7+
type: git
8+
name: 1ESPipelineTemplates/1ESPipelineTemplates
9+
ref: refs/tags/release
10+
pipelines:
11+
- pipeline: CI
12+
project: DevDiv
13+
source: VisualStudio.Conversations
14+
branch: main
15+
extends:
16+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
17+
parameters:
18+
pool:
19+
name: AzurePipelines-EO
20+
image: 1ESPT-Windows2022
21+
os: windows
22+
stages:
23+
- stage: Upload
24+
jobs:
25+
- job: UploadToServer
26+
displayName: Upload to server
27+
pool:
28+
name: AzurePipelines-EO
29+
image: 1ESPT-Windows2022
30+
os: windows
31+
templateContext:
32+
type: releaseJob
33+
isProduction: false #change this
34+
inputs:
35+
- input: pipelineArtifact
36+
pipeline: CI
37+
artifactName: partnerDeployables-Windows
38+
destinationPath: $(Pipeline.Workspace)/artifacts
39+
40+
steps:
41+
- checkout: none
42+
43+
- task: CopyFiles@2
44+
displayName: 'Copy files from Zip folder to staging directory'
45+
inputs:
46+
SourceFolder: '$(Pipeline.Workspace)/'
47+
Contents: '**/*Roslyn.LanguageServer*.zip'
48+
TargetFolder: '$(Build.ArtifactStagingDirectory)/staging'
49+
CleanTargetFolder: true
50+
51+
- task: AzureFileCopy@6
52+
displayName: "Copy the zip to Azure Storage"
53+
inputs:
54+
SourcePath: '$(Build.ArtifactStagingDirectory)/staging/*'
55+
azureSubscription: "$(AzSubscription)"
56+
Destination: "AzureBlob"
57+
storage: "$(AzStorage)"
58+
ContainerName: "$(AzContainerName)"

azure-pipelines/test-matrix.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
parameters:
2+
- name: os
3+
type: string
24
- name: pool
35
type: object
46
- name: containerName
@@ -19,9 +21,10 @@ jobs:
1921
UnitTests:
2022
npmCommand: test:unit
2123
isIntegration: false
22-
CSharpIntegrationTests:
23-
npmCommand: test:integration:csharp
24-
isIntegration: true
24+
${{ if ne(parameters.os, 'windows') }}:
25+
CSharpIntegrationTests:
26+
npmCommand: test:integration:csharp
27+
isIntegration: true
2528
DevKitTests:
2629
npmCommand: test:integration:devkit
2730
isIntegration: true

package.json

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
"workspace"
4141
],
4242
"defaults": {
43-
"roslyn": "5.0.0-2.25405.5",
43+
"roslyn": "5.0.0-2.25412.5",
4444
"omniSharp": "1.39.14",
45-
"razor": "10.0.0-preview.25403.1",
45+
"razor": "10.0.0-preview.25411.5",
4646
"razorOmnisharp": "7.0.0-preview.23363.1",
4747
"xamlTools": "17.14.36106.43"
4848
},
@@ -71,19 +71,19 @@
7171
"l10nDevGenerateLocalizationBundle": "npx @vscode/l10n-dev export --outDir ./l10n ./src",
7272
"compile:razorTextMate": "npx js-yaml src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml > src/razor/syntaxes/aspnetcorerazor.tmLanguage.json",
7373
"test:unit": "npm run compileDev && gulp test:unit",
74-
"test:integration:csharp": "npm run package && gulp test:integration:csharp",
75-
"test:integration:razor": "npm run package && gulp test:integration:razor",
76-
"test:integration:razor:cohost": "npm run package && gulp test:integration:razor:cohost",
77-
"test:integration:devkit": "npm run package && gulp test:integration:devkit",
78-
"test:integration:untrusted": "npm run package && gulp test:integration:untrusted",
74+
"test:integration:csharp": "npm run packageDev && gulp test:integration:csharp",
75+
"test:integration:razor": "npm run packageDev && gulp test:integration:razor",
76+
"test:integration:razor:cohost": "npm run packageDev && gulp test:integration:razor:cohost",
77+
"test:integration:devkit": "npm run packageDev && gulp test:integration:devkit",
78+
"test:integration:untrusted": "npm run packageDev && gulp test:integration:untrusted",
7979
"profiling": "npm run package && gulp profiling",
8080
"test:artifacts": "npm run compileDev && gulp test:artifacts",
81-
"omnisharptest": "npm run package && gulp omnisharptest",
81+
"omnisharptest": "npm run packageDev && gulp omnisharptest",
8282
"omnisharptest:unit": "npm run compileDev && gulp omnisharptest:unit",
83-
"omnisharptest:integration": "npm run package && gulp omnisharptest:integration",
84-
"omnisharptest:integration:singleCsproj": "npm run package && gulp omnisharptest:integration:singleCsproj",
85-
"omnisharptest:integration:slnWithCsproj": "npm run package && gulp omnisharptest:integration:slnWithCsproj",
86-
"omnisharptest:integration:slnFilterWithCsproj": "npm run package && gulp omnisharptest:integration:slnFilterWithCsproj",
83+
"omnisharptest:integration": "npm run packageDev && gulp omnisharptest:integration",
84+
"omnisharptest:integration:singleCsproj": "npm run packageDev && gulp omnisharptest:integration:singleCsproj",
85+
"omnisharptest:integration:slnWithCsproj": "npm run packageDev && gulp omnisharptest:integration:slnWithCsproj",
86+
"omnisharptest:integration:slnFilterWithCsproj": "npm run packageDev && gulp omnisharptest:integration:slnFilterWithCsproj",
8787
"updatePackageDependencies": "gulp updatePackageDependencies",
8888
"l10nDevGenerateXlf": "npx @vscode/l10n-dev generate-xlf ./package.nls.json ./l10n/bundle.l10n.json --outFile ./loc/vscode-csharp.xlf",
8989
"l10nDevImportXlf": "npx @vscode/l10n-dev import-xlf ./loc/vscode-csharp.*.xlf --outDir ./l10n && move l10n\\package.nls.*.json ."
@@ -5627,6 +5627,11 @@
56275627
"when": "editorLangId == csharp && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')",
56285628
"group": "2_dotnet@2"
56295629
}
5630+
],
5631+
"issue/reporter": [
5632+
{
5633+
"command": "csharp.reportIssue"
5634+
}
56305635
]
56315636
},
56325637
"viewsWelcome": [

src/lsptoolshost/activate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function activateRoslynLanguageServer(
8383
registerCopilotContextProviders(context, languageServer, _channel);
8484

8585
// Register any commands that need to be handled by the extension.
86-
registerCommands(context, languageServer, hostExecutableResolver, _channel);
86+
registerCommands(context, languageServer, hostExecutableResolver, _channel, _traceChannel);
8787
registerNestedCodeActionCommands(context, languageServer, _channel);
8888
registerCodeActionFixAllCommands(context, languageServer, _channel);
8989

0 commit comments

Comments
 (0)