@@ -19,20 +19,15 @@ import { getApiDetails, getGitHubVersion } from "./api-client";
1919import { runAutobuild } from "./autobuild" ;
2020import { getTotalCacheSize , shouldStoreCache } from "./caching-utils" ;
2121import { getCodeQL } from "./codeql" ;
22- import {
23- Config ,
24- getConfig ,
25- isCodeQualityEnabled ,
26- isCodeScanningEnabled ,
27- } from "./config-utils" ;
22+ import { Config , getConfig } from "./config-utils" ;
2823import { uploadDatabases } from "./database-upload" ;
2924import {
3025 DependencyCacheUploadStatusReport ,
3126 uploadDependencyCaches ,
3227} from "./dependency-caching" ;
3328import { getDiffInformedAnalysisBranches } from "./diff-informed-analysis-utils" ;
3429import { EnvVar } from "./environment" ;
35- import { Feature , Features } from "./feature-flags" ;
30+ import { Features } from "./feature-flags" ;
3631import { KnownLanguage } from "./languages" ;
3732import { getActionsLogger , Logger } from "./logging" ;
3833import { uploadOverlayBaseDatabaseToCache } from "./overlay-database-utils" ;
@@ -357,46 +352,15 @@ async function run() {
357352 const checkoutPath = actionsUtil . getRequiredInput ( "checkout_path" ) ;
358353 const category = actionsUtil . getOptionalInput ( "category" ) ;
359354
360- if ( await features . getValue ( Feature . AnalyzeUseNewUpload ) ) {
361- uploadResults = await postProcessAndUploadSarif (
362- logger ,
363- features ,
364- uploadKind ,
365- checkoutPath ,
366- outputDir ,
367- category ,
368- actionsUtil . getOptionalInput ( "post-processed-sarif-path" ) ,
369- ) ;
370- } else if ( uploadKind === "always" ) {
371- uploadResults = { } ;
372-
373- if ( isCodeScanningEnabled ( config ) ) {
374- uploadResults [ analyses . AnalysisKind . CodeScanning ] =
375- await uploadLib . uploadFiles (
376- outputDir ,
377- checkoutPath ,
378- category ,
379- features ,
380- logger ,
381- analyses . CodeScanning ,
382- ) ;
383- }
384-
385- if ( isCodeQualityEnabled ( config ) ) {
386- uploadResults [ analyses . AnalysisKind . CodeQuality ] =
387- await uploadLib . uploadFiles (
388- outputDir ,
389- checkoutPath ,
390- category ,
391- features ,
392- logger ,
393- analyses . CodeQuality ,
394- ) ;
395- }
396- } else {
397- uploadResults = { } ;
398- logger . info ( "Not uploading results" ) ;
399- }
355+ uploadResults = await postProcessAndUploadSarif (
356+ logger ,
357+ features ,
358+ uploadKind ,
359+ checkoutPath ,
360+ outputDir ,
361+ category ,
362+ actionsUtil . getOptionalInput ( "post-processed-sarif-path" ) ,
363+ ) ;
400364
401365 // Set the SARIF id outputs only if we have results for them, to avoid
402366 // having keys with empty values in the action output.
0 commit comments