From 53bed11e0b0c1befe2507e663420624606caf48f Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 21 Sep 2023 16:11:21 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Henry Mercer --- src/autobuild.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/autobuild.ts b/src/autobuild.ts index 50f2e43db0..337071faf4 100644 --- a/src/autobuild.ts +++ b/src/autobuild.ts @@ -117,15 +117,14 @@ async function setupCppAutobuild(codeql: CodeQL, logger: Logger) { process.env["RUNNER_ENVIRONMENT"] === "self-hosted" && process.env[envVar] !== "true" ) { - logger.info(`Disabling ${featureName} as we are on a self-hosted runner`); - logger.info(`This can be enabled by setting ${envVar}: true in the env`); + logger.info(`Disabling ${featureName} as we are on a self-hosted runner.` + getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow (see https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow).` : ""); core.exportVariable(envVar, "false"); } else { - logger.info(`Enabling ${featureName}`); + logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false' (see https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow).`); core.exportVariable(envVar, "true"); } } else { - logger.info(`Disabling ${featureName}`); + logger.info(`Disabling ${featureName}.`); core.exportVariable(envVar, "false"); } }