Workflow to automatically add preview/rc labels for merged PRs#37737
Merged
roji merged 3 commits intodotnet:mainfrom Feb 19, 2026
Merged
Workflow to automatically add preview/rc labels for merged PRs#37737roji merged 3 commits intodotnet:mainfrom
roji merged 3 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow intended to automatically label issues closed by PRs merged into main with the next preview/RC label, inferred from existing release/* branches.
Changes:
- Introduces
.github/workflows/label-preview-version.ymlto compute the nextpreview-*/rc-*label based on branch names. - Queries closing issues for a merged PR via GraphQL and applies the computed label via the Issues API.
- Use pull_request_target instead of pull_request so fork PRs get a write token (the workflow doesn't execute PR code, only reads metadata) - Add pull-requests: read permission for the GraphQL query - Use Git refs API (listMatchingRefs) to fetch only release/ branches instead of listing all branches - Label all closingIssuesReferences without filtering by CLOSED state to avoid race conditions with GitHub's eventual consistency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndriySvyryd
approved these changes
Feb 18, 2026
When a PR is merged directly into a release branch (e.g. release/11.0-preview2), derive the label from the branch name (preview-2) instead of scanning for the next unreleased version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.