| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR adds automatic detection of GitHub Actions workflows to the CodeQL Action's language detection system. Since GitHub's Linguist API doesn't classify Actions workflows as a language, this enhancement enables the CodeQL Action to detect them by checking for a non-empty .github/workflows directory.
Key changes:
Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/config-utils.ts | Implements workflow detection logic and updates language detection functions |
| src/config-utils.test.ts | Updates test calls to include new sourceRoot parameter |
| lib/config-utils.js | Generated JavaScript equivalent of TypeScript changes |
| lib/config-utils.test.js | Generated JavaScript equivalent of test changes |
src/config-utils.ts:340
const stats = fs.lstatSync(workflowsPath); return stats.isDirectory() && fs.readdirSync(workflowsPath).length > 0;
Sorry, something went wrong.
There was a problem hiding this comment.
We have an implementation of language autodetection in the CLI which I'd like to see us use in the Action too, but given the simplicity of this PR this looks good as a quick fix.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This modifies getRawLanguagesInRepo to automatically detect Actions workflows. Linguist does not class those as a language, and so we failed to automatically detect them before.
I chose to implement this by checking for a non-empty .github/workflows directory, relative to source-root.
Merge / deployment checklist