mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Add telemetry diagnostic to track whether repo property is used
This commit is contained in:
Generated
+10
@@ -109761,6 +109761,16 @@ async function run(startedAt) {
|
||||
)
|
||||
);
|
||||
}
|
||||
if (config.enableFileCoverageInformation && isAnalyzingPullRequest() && repositoryPropertiesResult.orElse({})["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */] === true) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/file-coverage-on-prs-enabled-by-repository-property",
|
||||
"File coverage on PRs enabled by repository property",
|
||||
{}
|
||||
)
|
||||
);
|
||||
}
|
||||
await checkInstallPython311(config.languages, codeql);
|
||||
} catch (unwrappedError) {
|
||||
const error3 = wrapError(unwrappedError);
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
getOptionalInput,
|
||||
getRequiredInput,
|
||||
getTemporaryDirectory,
|
||||
isAnalyzingPullRequest,
|
||||
persistInputs,
|
||||
} from "./actions-util";
|
||||
import { AnalysisKind, getAnalysisKinds } from "./analyses";
|
||||
@@ -42,6 +43,7 @@ import { Feature, FeatureEnablement, initFeatures } from "./feature-flags";
|
||||
import {
|
||||
loadPropertiesFromApi,
|
||||
RepositoryProperties,
|
||||
RepositoryPropertyName,
|
||||
} from "./feature-flags/properties";
|
||||
import {
|
||||
checkInstallPython311,
|
||||
@@ -398,6 +400,23 @@ async function run(startedAt: Date) {
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
config.enableFileCoverageInformation &&
|
||||
isAnalyzingPullRequest() &&
|
||||
repositoryPropertiesResult.orElse({})[
|
||||
RepositoryPropertyName.FILE_COVERAGE_ON_PRS
|
||||
] === true
|
||||
) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/file-coverage-on-prs-enabled-by-repository-property",
|
||||
"File coverage on PRs enabled by repository property",
|
||||
{},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
await checkInstallPython311(config.languages, codeql);
|
||||
} catch (unwrappedError) {
|
||||
const error = wrapError(unwrappedError);
|
||||
|
||||
Reference in New Issue
Block a user