mirror of
https://github.com/github/codeql-action.git
synced 2026-05-30 02:14:32 +00:00
More fixes from CR
This commit is contained in:
@@ -133,3 +133,13 @@ test("resolveToolsInput ignores repository property when fallback is disabled",
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("resolveToolsInput does not log when fallback is disabled and repository property is not set", (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
|
||||
const result = resolveToolsInput(undefined, false, {}, logger);
|
||||
|
||||
t.is(result, undefined);
|
||||
t.is(loggedMessages.length, 0);
|
||||
});
|
||||
|
||||
@@ -28,14 +28,17 @@ export function resolveToolsInput(
|
||||
return toolsWorkflowInput;
|
||||
}
|
||||
|
||||
const toolsPropertyValue = repositoryProperties[RepositoryPropertyName.TOOLS];
|
||||
|
||||
if (!allowRepositoryPropertyFallback) {
|
||||
logger.info(
|
||||
`No explicit tools input was provided. Ignoring '${RepositoryPropertyName.TOOLS}' repository property because it is only supported for dynamic workflows.`,
|
||||
);
|
||||
if (toolsPropertyValue) {
|
||||
logger.info(
|
||||
`No explicit tools input was provided. Ignoring '${RepositoryPropertyName.TOOLS}' repository property because it is only supported for dynamic workflows.`,
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const toolsPropertyValue = repositoryProperties[RepositoryPropertyName.TOOLS];
|
||||
if (toolsPropertyValue) {
|
||||
logger.info(
|
||||
`Setting tools: ${toolsPropertyValue} based on the '${RepositoryPropertyName.TOOLS}' repository property.`,
|
||||
|
||||
Reference in New Issue
Block a user