Skip to content

Commit d72c7f1

Browse files
committed
Use analysisKinds from config in createStatusReportBase
Replaces the synthetic value for `analysisKinds`
1 parent c1efb64 commit d72c7f1

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

lib/status-report.js

Lines changed: 1 addition & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/status-report.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/status-report.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ import {
1111
getRequiredInput,
1212
isSelfHostedRunner,
1313
} from "./actions-util";
14-
import { AnalysisKind } from "./analyses";
1514
import { getAnalysisKey, getApiClient } from "./api-client";
16-
import { isCodeQualityEnabled, type Config } from "./config-utils";
15+
import { type Config } from "./config-utils";
1716
import { DocUrl } from "./doc-url";
1817
import { EnvVar } from "./environment";
1918
import { getRef } from "./git-utils";
@@ -290,26 +289,13 @@ export async function createStatusReportBase(
290289
const isSteadyStateDefaultSetupRun =
291290
process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true";
292291

293-
// We leave `analyses` empty if we don't have a `config`, so that we don't
294-
// accidentally report only `code-scanning` when we can't tell whether `code-quality`
295-
// is enabled or not.
296-
const analysisKinds: AnalysisKind[] = [];
297-
298-
if (config !== undefined) {
299-
analysisKinds.push(AnalysisKind.CodeScanning);
300-
301-
if (isCodeQualityEnabled(config)) {
302-
analysisKinds.push(AnalysisKind.CodeQuality);
303-
}
304-
}
305-
306292
const statusReport: StatusReportBase = {
307293
action_name: actionName,
308294
action_oid: "unknown", // TODO decide if it's possible to fill this in
309295
action_ref: actionRef,
310296
action_started_at: actionStartedAt.toISOString(),
311297
action_version: getActionVersion(),
312-
analysis_kinds: analysisKinds.join(","),
298+
analysis_kinds: config?.analysisKinds.join(","),
313299
analysis_key,
314300
build_mode: config?.buildMode,
315301
commit_oid: commitOid,

0 commit comments

Comments
 (0)