-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Actions: don't fail if no JS/TS code was found #20752
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
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 PR adds support for detecting when the Actions extractor is being used and adjusts the extraction failure logic accordingly. The key change allows the extractor to succeed even when no JavaScript/TypeScript code is found if running in Actions extractor mode.
- Added a new environment variable
CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASEand helper method to detect Actions extractor mode - Modified the extraction failure condition to allow success without code when using the Actions extractor
- Fixed comment typos in the extraction logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| EnvironmentVariables.java | Added constant for Actions extractor environment variable and isActionsExtractor() helper method |
| AutoBuild.java | Updated extraction failure condition to allow Actions extractor to succeed without code, and fixed comment typos |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
Outdated
Show resolved
Hide resolved
javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The code was written on the assumption that 'seenCode' implies 'seenFiles' but the unit test override 'hasSeenCode()' to always return true. Which meant we would start taking this branch in the unit tests.
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.
CI looks good for both JS and Actions (manually dispatched).
Actions: don't fail if no JS/TS code was found
…f-no-js Backport: Merge pull request #20752 from asgerf/actions/dont-fail-if-no-js
No description provided.