Updating auto updater for version labeling - #208
Merged
Conversation
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
felickz
August 3, 2026 19:44
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the two “auto-update” workflows to apply version-specific labels to the PRs they open, and proactively creates those labels so PR creation doesn’t fail due to missing labels.
Changes:
update-release.yml: extracts the bumped.release.ymlversion and applies arelease-v<version>label to the created PR, creating that label if needed.update-codeql-version.yml: computes a label list (version,codeql-cli-v<cli>, and optionallyrelease-v<release>) and creates any version-specific labels before opening the PR.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/update-release.yml | Adds release-version extraction and ensures release-v<version> exists; applies it to the created release bump PR. |
| .github/workflows/update-codeql-version.yml | Adds computed multi-label output, ensures version-specific labels exist, and applies the computed labels to the created CLI bump PR. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
+213
to
+216
| while IFS= read -r LABEL; do | ||
| [[ "$LABEL" == "version" ]] && continue | ||
| gh label create "$LABEL" --color ededed --force | ||
| done <<< "${{ steps.pr_labels.outputs.list }}" |
Contributor
Author
There was a problem hiding this comment.
Worth fixing: the here-string does append a trailing newline, so the loop would run gh label create "" and fail the job. Fixed in 5a5b0a4 by skipping empty values. Also switched from [[ ... ]] && continue to an if block, since under set -e a false [[ ]] as the last command in the loop body could abort the script.
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (2)
.github/workflows/update-release.yml:93
- This step creates the version-specific
release-v…label, but does not ensure the baseversionlabel exists. Since the PR applies both labels to the created PR, upsertingversionhere too would better match the stated goal of creating required labels automatically if missing, and avoids failures if the label is ever removed.
set -euo pipefail
# `gh label create --force` is idempotent, so re-running this
# workflow for the same release version is safe.
gh label create "release-v${{ steps.release_version.outputs.version }}" --color ededed --force
.github/workflows/update-codeql-version.yml:218
- The workflow ensures version-specific labels exist, but it explicitly skips creating the base
versionlabel. That contradicts the PR goal of creating required labels automatically if missing, and could causecreate-pull-requestto fail if theversionlabel is ever deleted/renamed. Consider creating/upsertingversionas well (idempotent with--force) and then only skipping empty lines in the loop.
# `version` already exists in the repo; only the version-specific
# labels below need to be created on demand. `gh label create --force`
# is idempotent, so re-running this workflow for the same version is
# safe.
while IFS= read -r LABEL; do
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
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.
This pull request updates the automation in
.github/workflows/update-codeql-version.ymland.github/workflows/update-release.ymlto improve labeling of pull requests with version-specific labels. This ensures that PRs are tagged with both a generalversionlabel and a label indicating the specific release version, and that these labels are created automatically if they do not exist. This improves traceability and automation around versioned changes.Enhancements to PR labeling and automation:
codeql-cli-vX.Y.Z,release-vX.Y.Z) to pull requests inupdate-codeql-version.yml, and ensured these labels are created automatically if missing. [1] [2]update-release.ymlto determine the new release version from.release.yml, create the correspondingrelease-vX.Y.Zlabel if needed, and add it to the PR alongside theversionlabel. [1] [2] [3]