Skip to content

Commit 9bfa05f

Browse files
Merge pull request #3 from aeisenberg/aeisenberg/add-ref-input
Update the description of new inputs
2 parents 72f9a88 + 6c6b8c3 commit 9bfa05f

8 files changed

Lines changed: 20 additions & 6 deletions

File tree

analyze/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ inputs:
4646
required: false
4747
default: ${{ github.workspace }}
4848
ref:
49-
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well."
49+
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is not available in pull requests from forks."
5050
required: false
5151
sha:
52-
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well."
52+
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is not available in pull requests from forks."
5353
required: false
5454
category:
5555
description: String used by Code Scanning for matching the analyses

lib/actions-util.js

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

lib/actions-util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

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

lib/upload-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions-util.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,12 @@ export async function sendStatusReport<S extends StatusReportBase>(
618618
): Promise<boolean> {
619619
const statusReportJSON = JSON.stringify(statusReport);
620620
core.debug(`Sending status report: ${statusReportJSON}`);
621+
// If in test mode we don't want to upload the results
622+
const testMode = process.env["TEST_MODE"] === "true" || false;
623+
if (testMode) {
624+
core.debug("In test mode. Status reports are not uploaded.");
625+
return true;
626+
}
621627

622628
const nwo = getRequiredEnvParam("GITHUB_REPOSITORY");
623629
const [owner, repo] = nwo.split("/");

src/upload-lib.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ async function uploadPayload(
100100
// If in test mode we don't want to upload the results
101101
const testMode = process.env["TEST_MODE"] === "true" || false;
102102
if (testMode) {
103+
logger.debug("In test mode. Results are not uploaded.");
103104
return;
104105
}
105106

upload-sarif/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ inputs:
1414
required: false
1515
default: ${{ github.workspace }}
1616
ref:
17-
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well."
17+
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is not available in pull requests from forks."
1818
required: false
1919
sha:
20-
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well."
20+
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is not available in pull requests from forks."
2121
required: false
2222
token:
2323
default: ${{ github.token }}

0 commit comments

Comments
 (0)