Extract semantic CLI version from URL when requesting specific tools by henrymercer · Pull Request #1682 · github/codeql-action (original) (raw)

This PR prepares the Action for migrating the CodeQL Bundle to be versioned using a semantic version (e.g. codeql-bundle-v1.2.3). Most of the work is already done, but this PR makes a small improvement to ensure we can look up CLIs requested via tools in the tool cache before downloading them. Specifically, we populate cliVersion when we can recognize that the requested CodeQL Bundle tag uses a semantic version. The rest of the changes here are pulling out shared test utilities so we can write more specific CodeQL setup tests in setup-codeql.test.ts.

There's scope for some cleanup and refactoring here now we're migrating the bundle version to semver, but this will be easier to do once this change is fully rolled out.

We also add a changelog note to notify customers about the change to the way that bundles will be tagged for future CodeQL versions.

Merge / deployment checklist