Skip to content

Commit 22aba57

Browse files
committed
Include analysis kind in payloadSaveFile path in uploadPayload
1 parent 6f964b7 commit 22aba57

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

lib/analyze-action.js

Lines changed: 4 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: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 4 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.js

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

src/upload-lib.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,15 @@ async function uploadPayload(
352352
payload: any,
353353
repositoryNwo: RepositoryNwo,
354354
logger: Logger,
355-
target: analyses.SARIF_UPLOAD_ENDPOINT,
355+
analysis: analyses.AnalysisConfig,
356356
): Promise<string> {
357357
logger.info("Uploading results");
358358

359359
// If in test mode we don't want to upload the results
360360
if (util.isInTestMode()) {
361361
const payloadSaveFile = path.join(
362362
actionsUtil.getTemporaryDirectory(),
363-
"payload.json",
363+
`payload-${analysis.kind}.json`,
364364
);
365365
logger.info(
366366
`In test mode. Results are not uploaded. Saving to ${payloadSaveFile}`,
@@ -373,7 +373,7 @@ async function uploadPayload(
373373
const client = api.getApiClient();
374374

375375
try {
376-
const response = await client.request(target, {
376+
const response = await client.request(analysis.target, {
377377
owner: repositoryNwo.owner,
378378
repo: repositoryNwo.repo,
379379
data: payload,
@@ -807,7 +807,7 @@ export async function uploadSpecifiedFiles(
807807
payload,
808808
getRepositoryNwo(),
809809
logger,
810-
uploadTarget.target,
810+
uploadTarget,
811811
);
812812

813813
logger.endGroup();

0 commit comments

Comments
 (0)