Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GeekMasher
Copy link
Contributor

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a 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."
Copy link
Preview

Copilot AI Apr 17, 2025

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.

Suggested change
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.

@GeekMasher GeekMasher changed the title feat(ci): Add support for .codeqlversion Feat: Add support for .codeqlversion Apr 17, 2025
Copy link
Collaborator

@michaelnebel michaelnebel left a 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?

@GeekMasher
Copy link
Contributor Author

Yes. Let me do that tomorrow before we merge this

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.

2 participants