Skip to content

Commit 66fe244

Browse files
committed
Changes from CR
1 parent 8266ae1 commit 66fe244

File tree

9 files changed

+42
-38
lines changed

9 files changed

+42
-38
lines changed

lib/analyze-action.js

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

lib/init-action-post.js

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

lib/init-action.js

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

lib/setup-codeql-action.js

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

lib/upload-lib.js

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

lib/upload-sarif-action.js

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

src/actions-util.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,20 @@ export function resolveToolsInput(
6565
const toolsPropertyValue: string | undefined =
6666
repositoryProperties[toolsPropertyName];
6767
const effectiveToolsInput = toolsWorkflowInput ?? toolsPropertyValue;
68-
68+
6969
// Log the source of the tools input for transparency
7070
if (effectiveToolsInput) {
7171
if (toolsWorkflowInput) {
72-
logger.info(`Setting tools: ${effectiveToolsInput} based on workflow input.`);
72+
logger.info(
73+
`Setting tools: ${effectiveToolsInput} based on workflow input.`,
74+
);
7375
} else {
74-
logger.info(`Setting tools: ${effectiveToolsInput} based on the '${toolsPropertyName}' repository property.`);
76+
logger.info(
77+
`Setting tools: ${effectiveToolsInput} based on the '${toolsPropertyName}' repository property.`,
78+
);
7579
}
7680
}
77-
81+
7882
return effectiveToolsInput;
7983
}
8084

src/setup-codeql.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ test.serial(
113113
false,
114114
features,
115115
getRunnerLogger(true),
116+
false,
116117
);
117118

118119
t.is(source.sourceType, "download");
@@ -136,6 +137,7 @@ test.serial(
136137
false,
137138
features,
138139
getRunnerLogger(true),
140+
false,
139141
);
140142

141143
t.is(source.toolsVersion, LINKED_CLI_VERSION.cliVersion);
@@ -161,6 +163,7 @@ test.serial(
161163
false,
162164
features,
163165
logger,
166+
false,
164167
);
165168

166169
// First, ensure that the CLI version is the linked version, so that backwards
@@ -323,6 +326,7 @@ test.serial(
323326
false,
324327
features,
325328
logger,
329+
false,
326330
);
327331

328332
// Check that the `CodeQLToolsSource` object matches our expectations.
@@ -384,6 +388,7 @@ test.serial(
384388
false,
385389
features,
386390
logger,
391+
false,
387392
);
388393

389394
// Check that the `CodeQLToolsSource` object matches our expectations.
@@ -438,6 +443,7 @@ test.serial(
438443
false,
439444
features,
440445
logger,
446+
false,
441447
);
442448

443449
// Check that the toolcache functions were called with the expected arguments
@@ -505,6 +511,7 @@ const toolcacheInputFallbackMacro = test.macro({
505511
false,
506512
features,
507513
logger,
514+
false,
508515
);
509516

510517
// Check that the toolcache functions were called with the expected arguments

src/setup-codeql.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export async function getCodeQLSource(
287287
tarSupportsZstd: boolean,
288288
features: FeatureEnablement,
289289
logger: Logger,
290-
toolsInputFromRepositoryProperty: boolean = false,
290+
toolsInputFromRepositoryProperty: boolean,
291291
): Promise<CodeQLToolsSource> {
292292
// If there is an explicit `tools` input, it's not one of the reserved values, and it doesn't appear
293293
// to point to a URL, then we assume it is a local path and use the CLI from there.
@@ -361,9 +361,7 @@ export async function getCodeQLSource(
361361
),
362362
);
363363
} else {
364-
logger.info(
365-
`Using the latest CodeQL CLI nightly, as requested.`,
366-
);
364+
logger.info(`Using the latest CodeQL CLI nightly, as requested.`);
367365
}
368366
toolsInput = await getNightlyToolsUrl(logger);
369367
}
@@ -409,8 +407,7 @@ export async function getCodeQLSource(
409407
);
410408
const allowToolcacheValue =
411409
toolsInputFromRepositoryProperty || // Repository properties bypass all restrictions
412-
(allowToolcacheValueFF &&
413-
(isDynamicWorkflow() || util.isInTestMode()));
410+
(allowToolcacheValueFF && (isDynamicWorkflow() || util.isInTestMode()));
414411
if (allowToolcacheValue) {
415412
// If `toolsInput === "toolcache"`, try to find the latest version of the CLI that's available in the toolcache
416413
// and use that. We perform this check here since we can set `cliVersion` directly and don't want to default to

0 commit comments

Comments
 (0)