-
Notifications
You must be signed in to change notification settings - Fork 403
Introduce CODEQL_ACTION_SKIP_SARIF_UPLOAD
#3180
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
Changes from 8 commits
e0b9da7
882667e
11e4034
680b070
25c8db9
00a6e13
5dfb610
86b2ad6
1b09eb4
df65651
d05f225
1707898
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -356,18 +356,17 @@ async function uploadPayload( | |||||
): Promise<string> { | ||||||
logger.info("Uploading results"); | ||||||
|
||||||
// If in test mode we don't want to upload the results | ||||||
if (util.isInTestMode()) { | ||||||
if (util.shouldSkipSarifUpload()) { | ||||||
const payloadSaveFile = path.join( | ||||||
actionsUtil.getTemporaryDirectory(), | ||||||
"payload.json", | ||||||
); | ||||||
logger.info( | ||||||
`In test mode. Results are not uploaded. Saving to ${payloadSaveFile}`, | ||||||
`SARIF upload disabled via environment variable. Saving to ${payloadSaveFile}`, | ||||||
|
`SARIF upload disabled via environment variable. Saving to ${payloadSaveFile}`, | |
`SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}`, |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -23,7 +23,7 @@ import { | |||||
checkDiskUsage, | ||||||
getErrorMessage, | ||||||
initializeEnvironment, | ||||||
isInTestMode, | ||||||
shouldSkipSarifUpload, | ||||||
wrapError, | ||||||
} from "./util"; | ||||||
|
||||||
|
@@ -113,8 +113,10 @@ async function run() { | |||||
core.setOutput("sarif-ids", JSON.stringify(uploadResults)); | ||||||
|
||||||
// We don't upload results in test mode, so don't wait for processing | ||||||
if (isInTestMode()) { | ||||||
core.debug("In test mode. Waiting for processing is disabled."); | ||||||
if (shouldSkipSarifUpload()) { | ||||||
core.debug( | ||||||
"SARIF upload disabled via environment variable. Waiting for processing is disabled.", | ||||||
|
"SARIF upload disabled via environment variable. Waiting for processing is disabled.", | |
"SARIF upload disabled by an environment variable. Waiting for processing is disabled.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to revert this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope 😅