mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 22:30:44 +00:00
Refactor: remove argument array indirection and pass directly instead
This commit is contained in:
Generated
+3
-9
@@ -197,17 +197,11 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName, ghVariant,
|
||||
(await features.getValue(feature_flags_1.Feature.ArtifactUpgrade))
|
||||
? new artifact.DefaultArtifactClient()
|
||||
: artifactLegacy.create();
|
||||
const artifactUploaderArgs = [
|
||||
sanitizeArtifactName(`${artifactName}${suffix}`),
|
||||
toUpload.map((file) => path.normalize(file)),
|
||||
path.normalize(rootDir),
|
||||
{
|
||||
try {
|
||||
await artifactUploader.uploadArtifact(sanitizeArtifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
|
||||
// ensure we don't keep the debug artifacts around for too long since they can be large.
|
||||
retentionDays: 7,
|
||||
},
|
||||
];
|
||||
try {
|
||||
await artifactUploader.uploadArtifact(...artifactUploaderArgs);
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
// A failure to upload debug artifacts should not fail the entire action.
|
||||
|
||||
Reference in New Issue
Block a user