Skip to content

Commit 9a57e78

Browse files
committed
Improving sorting of matrix keys
1 parent 7e96d45 commit 9a57e78

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

lib/analyze-action-post.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action-post.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action-post.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/debug-artifacts.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,9 @@ export function getArtifactSuffix(matrix: string | undefined): string {
260260
let suffix = "";
261261
if (matrix) {
262262
try {
263-
for (const [, matrixVal] of Object.entries(
264-
JSON.parse(matrix) as any[][],
265-
).sort())
266-
suffix += `-${matrixVal}`;
263+
const matrixObject = JSON.parse(matrix) as any[][];
264+
for (const matrixKey of Object.keys(matrixObject).sort())
265+
suffix += `-${matrixObject[matrixKey]}`;
267266
} catch {
268267
core.info(
269268
"Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.",

0 commit comments

Comments
 (0)