-
Notifications
You must be signed in to change notification settings - Fork 19
Feat: Add support for .codeqlversion #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a feature to support specifying the CodeQL CLI version via a .codeqlversion file when no explicit version is provided through the input.
- Added conditional logic in the install-codeql GitHub Action to detect an empty CODEQL_CLI_VERSION and read the version from the .codeqlversion file.
Files not reviewed (1)
- .codeqlversion: Language not supported
@@ -26,6 +26,12 @@ runs: | |||
CODEQL_HOME: ${{ github.workspace }}/codeql_home | |||
CODEQL_CLI_VERSION: ${{ inputs.codeql-cli-version }} | |||
run: | | |||
if [ -z "$CODEQL_CLI_VERSION" ]; then | |||
echo "No CodeQL CLI version specified. Reading from .codeqlversion file." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a check to ensure the .codeqlversion file exists before attempting to read it, to prevent potential errors if the file is missing.
echo "No CodeQL CLI version specified. Reading from .codeqlversion file." | |
echo "No CodeQL CLI version specified. Checking for .codeqlversion file." | |
if [ ! -f ./.codeqlversion ]; then | |
echo "Error: .codeqlversion file not found. Please specify a CodeQL CLI version." >&2 | |
exit 1 | |
fi | |
echo "Reading CodeQL CLI version from .codeqlversion file." |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to do this!
It would be great this version number is used in both the CI and the publish workflows.
Do you intend to modify these as well?
Yes. Let me do that tomorrow before we merge this |
No description provided.