@@ -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 { cleanupAndUploadDatabases } 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 { cleanupAndUploadOverlayBaseDatabaseToCache } from "./overlay-database-utils" ;
@@ -358,46 +353,15 @@ async function run() {
358353 const checkoutPath = actionsUtil . getRequiredInput ( "checkout_path" ) ;
359354 const category = actionsUtil . getOptionalInput ( "category" ) ;
360355
361- if ( await features . getValue ( Feature . AnalyzeUseNewUpload ) ) {
362- uploadResults = await postProcessAndUploadSarif (
363- logger ,
364- features ,
365- uploadKind ,
366- checkoutPath ,
367- outputDir ,
368- category ,
369- actionsUtil . getOptionalInput ( "post-processed-sarif-path" ) ,
370- ) ;
371- } else if ( uploadKind === "always" ) {
372- uploadResults = { } ;
373-
374- if ( isCodeScanningEnabled ( config ) ) {
375- uploadResults [ analyses . AnalysisKind . CodeScanning ] =
376- await uploadLib . uploadFiles (
377- outputDir ,
378- checkoutPath ,
379- category ,
380- features ,
381- logger ,
382- analyses . CodeScanning ,
383- ) ;
384- }
385-
386- if ( isCodeQualityEnabled ( config ) ) {
387- uploadResults [ analyses . AnalysisKind . CodeQuality ] =
388- await uploadLib . uploadFiles (
389- outputDir ,
390- checkoutPath ,
391- category ,
392- features ,
393- logger ,
394- analyses . CodeQuality ,
395- ) ;
396- }
397- } else {
398- uploadResults = { } ;
399- logger . info ( "Not uploading results" ) ;
400- }
356+ uploadResults = await postProcessAndUploadSarif (
357+ logger ,
358+ features ,
359+ uploadKind ,
360+ checkoutPath ,
361+ outputDir ,
362+ category ,
363+ actionsUtil . getOptionalInput ( "post-processed-sarif-path" ) ,
364+ ) ;
401365
402366 // Set the SARIF id outputs only if we have results for them, to avoid
403367 // having keys with empty values in the action output.
0 commit comments