8000 Add `workload_run_attempt` to analysis upload by angelapwen · Pull Request #1658 · github/codeql-action · GitHub
[go: up one dir, main page]

Skip to content

Add workload_run_attempt to analysis upload #1658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add workflow_run_attempt to analysis payload
  • Loading branch information
angelapwen committed Apr 25, 2023
commit 75ca295b0491e685b15941886ca35fbe0e37f982
9 changes: 5 additions & 4 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/upload-lib.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.test.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/upload-lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined,
"",
undefined,
undefined,
"/opt/src",
undefined,
["CodeQL", "eslint"],
Expand All @@ -60,6 +61,7 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined,
"",
undefined,
undefined,
"/opt/src",
undefined,
["CodeQL", "eslint"],
Expand All @@ -76,6 +78,7 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined,
"",
undefined,
undefined,
"/opt/src",
undefined,
["CodeQL", "eslint"],
Expand Down
5 changes: 5 additions & 0 deletions src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export async function uploadFromActions(
category,
util.getRequiredEnvParam("GITHUB_WORKFLOW"),
workflow.getWorkflowRunID(),
workflow.getWorkflowRunAttempt(),
checkoutPath,
actionsUtil.getRequiredInput("matrix"),
logger
Expand Down Expand Up @@ -256,6 +257,7 @@ export function buildPayload(
analysisName: string | undefined,
zippedSarif: string,
workflowRunID: number | undefined,
workflowRunAttempt: number | undefined,
checkoutURI: string,
environment: string | undefined,
toolNames: string[],
Expand All @@ -268,6 +270,7 @@ export function buildPayload(
analysis_name: analysisName,
sarif: zippedSarif,
workflow_run_id: workflowRunID,
workflow_run_attempt: workflowRunAttempt,
checkout_uri: checkoutURI,
environment,
started_at: process.env[CODEQL_WORKFLOW_STARTED_AT],
Expand Down Expand Up @@ -313,6 +316,7 @@ async function uploadFiles(
category: string | undefined,
analysisName: string | undefined,
workflowRunID: number | undefined,
workflowRunAttempt: number | undefined,
sourceRoot: string,
environment: string | undefined,
logger: Logger
Expand Down Expand Up @@ -352,6 +356,7 @@ async function uploadFiles(
analysisName,
zippedSarif,
workflowRunID,
workflowRunAttempt,
checkoutURI,
environment,
toolNames,
Expand Down
0