feat(update-codeql-version): add optional release_bump input to publish in the same PR#167
Merged
Merged
Conversation
…a release into the same PR Adds an optional 'release_bump' string input (patch/minor/major, default empty) to update-codeql-version.yml. When set, the workflow runs the same 42ByteLabs/patch-release-me step update-release.yml uses, in the same run, folding a full release bump (every pack's version:, configs/*.yml refs, and cross-pack -libs pins) into the CLI/library dependency-refresh PR. Since publish.yml's auto-trigger fires on any push to main that changes .release.yml, merging this combined PR is then enough by itself to kick off the real batch publish - no separate update-release.yml run needed afterward for same-series patch bumps expected to be safe. Also: - Adds /codeql_home/ to .release.yml's excludes, since the new release_bump code path runs patch-release-me in a job where codeql_home/ already exists (from the earlier Setup CodeQL step) - a scenario update-release.yml, run standalone, never previously encountered. - Rewrites the PR title/body generation to branch on whether release_bump was set, so the PR clearly documents whether merging it will publish. - Documents the new input and combined-PR flow in CONTRIBUTING.md's 'Updating the pinned CodeQL CLI/library version' section. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional “release bump” path to the existing CodeQL CLI version-bump automation so maintainers can (optionally) bump the repo/pack release versions in the same PR as the CLI/library refresh, and documents the combined flow.
Changes:
- Add
release_bump(patch/minor/major, default empty) toupdate-codeql-version.yml, conditionally running42ByteLabs/patch-release-meand generating a dynamic PR title/body. - Update
.release.ymlexcludes to ignorecodeql_home/when the release bump runs in the same job as CodeQL setup. - Update
CONTRIBUTING.mdto document the new one-PR “refresh + optional release bump” workflow.
Show a summary per file
| File | Description |
|---|---|
CONTRIBUTING.md |
Documents the new optional combined flow and clarifies the post-PR checklist based on release_bump. |
.release.yml |
Excludes codeql_home/ to avoid release-bump tooling touching the downloaded CLI directory. |
.github/workflows/update-codeql-version.yml |
Adds the optional release-bump path and dynamically constructs PR title/body based on whether publishing will be triggered on merge. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Low
…tree Write the generated PR body to \ instead of the repo root, so peter-evans/create-pull-request doesn't pick it up as an untracked file and accidentally commit it into the PR it opens. Co-authored-by: Copilot App <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.
What
Adds an optional
release_bumpinput (patch/minor/major, default empty) to theUpdate CodeQL CLI Versionworkflow (update-codeql-version.yml)..codeqlversion, re-pinscodeql/*library deps, and refreshes lock files. Nothing publishes.patch/minor/major: the workflow additionally runs the same42ByteLabs/patch-release-mestepupdate-release.ymluses, in this same run — bumping the repo release version and propagating it to every pack's ownversion:field,configs/*.ymlreferences, and cross-pack-libspins, all in the same PR as the CLI/library bump.Since
publish.yml's auto-trigger fires on any push tomainthat changes.release.yml, merging this combined PR is then enough by itself to kick off the real batch publish — no separateupdate-release.ymlrun needed afterward. This is meant for the common case of a same-series CLI patch release expected to be low-risk (e.g.2.21.4→2.21.5); a minor/major CLI bump should probably still go through the two-step flow (fix breakage first, decide separately when to publish).Why
Requested after landing PR #163/#166 (the CLI 2.21.4 bump): today, safely publishing a CLI bump requires two separate
workflow_dispatchruns (update-codeql-version.ymlthenupdate-release.yml) even when the maintainer already knows the bump is safe to publish immediately. This collapses that into one optional flag.Changes
.github/workflows/update-codeql-version.yml:release_bumpstring input + validation step (must be empty/patch/minor/major).Bump release version (optional)step (42ByteLabs/patch-release-me, same pinned versionupdate-release.ymluses)..release.yml.Build PR title and bodystep, writingpr-body.md) so the PR clearly documents whether merging it will publish, and what's left to do either way..release.yml: added/codeql_home/toexcludes— defensive parity fix, since this new code path runspatch-release-mein a job wherecodeql_home/already exists (from the earlierSetup CodeQLstep), a scenarioupdate-release.ymlrun standalone never encountered.CONTRIBUTING.md: documents the newrelease_bumpinput and the combined-PR flow under "Updating the pinned CodeQL CLI/library version".Testing
run:step from the workflow YAML and validated withbash -n— all pass.release_bumpset) and confirmed the rendered PR title/body markdown is correct (proper backtick code-formatting, no stray backslashes, correct possessives) in both branches.contents: read) matchupdate-release.yml's existing, already-working use of the samepatch-release-meaction.workflow_dispatchwithrelease_bumpset — plan to do that as a follow-up once this merges, using a low-risk patch-level CLI bump.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com