-
Notifications
You must be signed in to change notification settings - Fork 39
Add workflows for fixed and prerelease label handling with automated comments #2174
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
Conversation
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.
Pull Request Overview
This PR adds automated GitHub workflow handling for "prerelease" and "fixed" labels on issues. When these labels are added, the workflows automatically comment on the issue to notify all involved participants with relevant instructions.
- Adds prerelease label workflow that notifies participants about available pre-release fixes with documentation links
- Adds fixed label workflow that notifies participants to update to latest versions
- Both workflows gather all issue participants (author, commenters, reactors) for comprehensive notifications
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/prerelease-label-comment.yml |
Workflow that triggers on "prerelease" label addition, gathers participants, and posts comment with pre-release installation instructions |
.github/workflows/fixed-label-comment.yml |
Workflow that triggers on "fixed" label addition, gathers participants, and posts comment instructing to update to latest versions |
| with: | ||
| script: | | ||
| const mentions = '${{steps.participants.outputs.mentions}}'; | ||
| const 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.`; |
Copilot
AI
Jul 25, 2025
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.
The participant gathering logic is duplicated between both workflows. Consider extracting this into a reusable action or composite action to reduce code duplication and improve maintainability.
timheuer
left a comment
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 wouldn't block this PR for sure, but the Copilot comment of using a composite script across both of these for the 'gather' is a fine one -- although would imagine we wouldn't get too out of sync.
i made a comment that some 'users' might be bots (our own labeler, etc.) so you may want to filter those known ones out.
mentions/reactions might be null (length=0) but I think you're likely still wanting to add a comment on the issue? if so, then you don't have to handle a null/0-len {mentions} as you aren't today.
| commenters.forEach(u => all_reactors.delete(u)); | ||
|
|
||
| // Combine all usernames | ||
| const all_users = [author, ...commenters, ...all_reactors]; |
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.
you may get bots in gathering everyone and not want to mention them...
// Filter out bot users
const isBotUser = (username) => {
return username.endsWith('[bot]') ||
username.includes('bot') ||
['dependabot', 'renovate', 'greenkeeper', 'codecov', 'coveralls'].includes(username.toLowerCase());
};
// When building the all_users array:
const all_users = [author, ...commenters, ...all_reactors].filter(user => !isBotUser(user));
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Removed bots
removed bots
…e label comment handler
|
|
||
| // Get all reactions from comments | ||
| let totalCommentReactions = 0; | ||
| for (const comment of comments) { |
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.
Loop through comments once instead of twice but it doesn't really matter for github action.
When "prerelease" label is added, it should automatically add a comment to all those involved sharing how they can try the fix and link out to https://github.com/microsoft/vscode-dotnettools/wiki/Installing-and-updating-pre%E2%80%90release-versions-of-C%23-Dev-Kit-and-C%23-Extension.
When "fixed" label is added, it should automatically add a comment to all those involved just telling them to update to the latest versions of everything.