[v3-2-test] CI: Run CodeQL only on languages changed in a pull request (#67972)#68024
Merged
Conversation
) PR-triggered CodeQL is by far the most frequent workflow in the repo (~1,300+ runs/week), and every run fans out one job per language (python, javascript, actions, go, java) regardless of what changed. The java job in particular runs a full Gradle build on every PR even though java-sdk files change in well under 1% of PRs. Gate the language matrix on the files actually changed in the PR: a docs-only PR now runs nothing, and the common python-only PR runs a single job instead of five. push-to-main and scheduled runs still scan every language, so coverage of the main branch is unchanged. (cherry picked from commit c91dc3b)
amoghrajesh
approved these changes
Jun 4, 2026
bugraoz93
approved these changes
Jun 4, 2026
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.
Backport of #67972 to v3-2-test.
This change makes CodeQL analysis more efficient by only running scans on languages whose files actually changed in a PR, while maintaining full coverage on pushes to main and scheduled runs.
Generated-by: Claude Code (Haiku 4.5) following the guidelines