Add feature for forcing the nightly bundle in dynamic workflows#3484
Open
Add feature for forcing the nightly bundle in dynamic workflows#3484
nightly bundle in dynamic workflows#3484Conversation
c4ada50 to
a61e3cb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a new ForceNightly feature flag that allows forcing the use of the nightly CodeQL CLI bundle in dynamic workflows (Default Setup, CCR, etc.). The feature flag is restricted to dynamic workflow events or test mode, preventing it from affecting advanced workflows. The PR includes comprehensive unit tests and an end-to-end PR check to validate the functionality.
Changes:
- Added
ForceNightlyfeature flag to enable nightly CLI for dynamic workflows - Enhanced
getCodeQLSourcewith documentation and logic to support forced nightly builds - Added unit tests for both
tools: nightlyand ForceNightly feature flag scenarios - Created new PR check workflow to validate the feature in CI
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/feature-flags.ts | Adds the ForceNightly feature flag definition with environment variable and default value |
| src/setup-codeql.ts | Implements logic to force nightly CLI when feature flag is enabled in dynamic workflows; adds JSDoc documentation and exports for testing |
| src/setup-codeql.test.ts | Adds comprehensive unit tests for nightly CLI selection via both explicit input and feature flag |
| pr-checks/checks/bundle-from-nightly.yml | Defines PR check template to validate ForceNightly feature works as expected |
| .github/workflows/__bundle-from-nightly.yml | Auto-generated workflow file from the PR check template |
| lib/*.js | Auto-generated JavaScript transpilation of TypeScript source changes (not reviewed per guidelines) |
esbena
previously approved these changes
Feb 16, 2026
Contributor
esbena
left a comment
There was a problem hiding this comment.
LGTM with some superficial logging observability/logging concerns.
Also set default `GITHUB_EVENT_NAME` in `setupActionsVars`
e7c08f9 to
e315c6f
Compare
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.
Adds a
Featurewhich, when enabled, and the workflow was triggered by adynamicevent forcesgetCodeQLSourceto pick the latest, nightly release.Some drive-by improvements and observations:
getCodeQLSource.!toolsInput.startsWith("http")check would probably cause problems if a file happened to have a path that starts withhttp. Probably not a very likely problem, but could be tricky to troubleshoot if it happens. We could improve this by performing more explicit checks forhttp://andhttps://or whether the suspected file exists locally or not. Outside of the scope of this PR though.tools: nightlywhich didn't seem to exist.getNightlyToolsUrlseems to assume that the nightly tag iscodeql-bundle-followed by a semver, but this is no longer the case for nightly releases. There's a fallback logic which handles this fine, but we should probably update this to expect the date-based tags.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, CCR, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist