Skip to content

Updating auto updater for version labeling - #208

Merged
felickz merged 2 commits into
mainfrom
copilot/update-auto-updater-labels
Aug 3, 2026
Merged

Updating auto updater for version labeling#208
felickz merged 2 commits into
mainfrom
copilot/update-auto-updater-labels

Conversation

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the automation in .github/workflows/update-codeql-version.yml and .github/workflows/update-release.yml to improve labeling of pull requests with version-specific labels. This ensures that PRs are tagged with both a general version label 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:

  • Added steps to compute and assign version-specific labels (e.g., codeql-cli-vX.Y.Z, release-vX.Y.Z) to pull requests in update-codeql-version.yml, and ensured these labels are created automatically if missing. [1] [2]
  • Updated update-release.yml to determine the new release version from .release.yml, create the corresponding release-vX.Y.Z label if needed, and add it to the PR alongside the version label. [1] [2] [3]

Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.yml version and applies a release-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 optionally release-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 }}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copilot AI review requested due to automatic review settings August 3, 2026 20:18
Copilot AI requested a review from felickz August 3, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 base version label exists. Since the PR applies both labels to the created PR, upserting version here 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 version label. That contradicts the PR goal of creating required labels automatically if missing, and could cause create-pull-request to fail if the version label is ever deleted/renamed. Consider creating/upserting version as 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

@felickz
felickz marked this pull request as ready for review August 3, 2026 20:34
@felickz
felickz merged commit 57e36ec into main Aug 3, 2026
22 checks passed
@felickz
felickz deleted the copilot/update-auto-updater-labels branch August 3, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants