Repository navigation
Use per-language CodeQL bundles #4146
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
Changes from 1 commit
ec5eecb
eb76062
289376d
59ce3a2
2d47caf
dfb9bf5
f536ef4
2f552a9
bd2ddba
89606bb
f4fa111
69f4715
5a2f29e
28b8f59
ed3a24c
549d498
ead1f7d
79fe3a1
ecec9b5
f18f353
07fa87d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import test from "ava"; | ||
|
|
||
| import { BundlePlatform } from "./bundle-platform"; | ||
| import { ActionsEnvVars, ReadOnlyEnv } from "./environment"; | ||
| import { ActionsEnvVars, Env } from "./environment"; | ||
| import { Feature } from "./feature-flags"; | ||
| import { BuiltInLanguage } from "./languages"; | ||
| import { | ||
|
|
@@ -13,6 +13,7 @@ import { | |
| createFeatures, | ||
| getRecordingLogger, | ||
| getTestEnv, | ||
| initAllState, | ||
| LoggedMessage, | ||
| } from "./testing-utils"; | ||
| import { GitHubVariant } from "./util"; | ||
|
|
@@ -30,16 +31,16 @@ const ELIGIBLE_OPTIONS: PerLanguageBundleOptions = { | |
| async function checkEligibility( | ||
| overrides: Partial<PerLanguageBundleOptions>, | ||
| enabledFeatures: Feature[] = [Feature.PerLanguageBundles], | ||
| env: ReadOnlyEnv = getTestEnv({ | ||
| env: Env = getTestEnv({ | ||
| [ActionsEnvVars.RUNNER_ENVIRONMENT]: "github-hosted", | ||
| }), | ||
| ) { | ||
| return getPerLanguageBundleLanguage( | ||
| { | ||
| initAllState({ | ||
| env, | ||
| features: createFeatures(enabledFeatures), | ||
| logger: getRecordingLogger([], { logToConsole: false }), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: Not needed if you don't inspect the log output. |
||
| }, | ||
| }), | ||
| { ...ELIGIBLE_OPTIONS, ...overrides }, | ||
| ); | ||
| } | ||
|
|
@@ -130,11 +131,11 @@ test("getPerLanguageBundleLanguage requires the feature flag", async (t) => { | |
| test("getPerLanguageBundleLanguage explains a disabled feature before checking eligibility", async (t) => { | ||
| const messages: LoggedMessage[] = []; | ||
| const language = await getPerLanguageBundleLanguage( | ||
| { | ||
| initAllState({ | ||
| env: getTestEnv(), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: not required if it's not customised. |
||
| features: createFeatures([]), | ||
| logger: getRecordingLogger(messages, { logToConsole: false }), | ||
| }, | ||
| }), | ||
| { ...ELIGIBLE_OPTIONS, rawLanguages: undefined, cliVersion: undefined }, | ||
| ); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.