Fix language inclusion test

`in` checks the indices of an array, not the values.
This commit is contained in:
Henry Mercer 2022-08-31 12:25:39 +01:00
parent 14d7039828
commit 955290300a
3 changed files with 3 additions and 3 deletions

2
lib/analyze-action.js generated
View file

@ -114,7 +114,7 @@ async function runGoAutobuilderIfLegacyWorkflow(config, featureFlags, logger) {
logger.debug("Won't run the Go autobuilder since Go extraction reconciliation is not enabled.");
return;
}
if (!(languages_1.Language.go in config.languages)) {
if (!config.languages.includes(languages_1.Language.go)) {
logger.info("Won't run the Go autobuilder since Go analysis is not enabled.");
return;
}

File diff suppressed because one or more lines are too long

View file

@ -153,7 +153,7 @@ async function runGoAutobuilderIfLegacyWorkflow(
);
return;
}
if (!(Language.go in config.languages)) {
if (!config.languages.includes(Language.go)) {
logger.info(
"Won't run the Go autobuilder since Go analysis is not enabled."
);