Skip to content

Commit 0171a2b

Browse files
henrymercerCopilot
andcommitted
Take a single ActionState parameter in getPerLanguageBundleLanguage
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 626d8b9 commit 0171a2b

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/per-language-bundles.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export interface PerLanguageBundleOptions {
139139

140140
/** Returns the eligible bundle language, or undefined for the combined bundle. */
141141
export function getPerLanguageBundleLanguage(
142-
{ env, logger }: ActionState<["Logger", "ReadOnlyEnv"]>,
142+
action: ActionState<["Logger", "ReadOnlyEnv"]>,
143143
options: PerLanguageBundleOptions,
144144
): BuiltInLanguage | undefined {
145145
const {
@@ -153,7 +153,9 @@ export function getPerLanguageBundleLanguage(
153153
} = options;
154154

155155
const explain = (reason: string) => {
156-
logger.debug(`Not using a per-language CodeQL bundle since ${reason}.`);
156+
action.logger.debug(
157+
`Not using a per-language CodeQL bundle since ${reason}.`,
158+
);
157159
return undefined;
158160
};
159161

@@ -188,7 +190,7 @@ export function getPerLanguageBundleLanguage(
188190
return explain(`we are running against ${variant}`);
189191
}
190192

191-
if (!isGitHubHostedRunner(env)) {
193+
if (!isGitHubHostedRunner(action.env)) {
192194
// Per-language installs stay out of the toolcache; self-hosted runners should retain
193195
// the reusable combined bundle instead.
194196
return explain("the job is not running on a GitHub-hosted runner");

0 commit comments

Comments
 (0)