GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update `upload` input values and logic by angelapwen · Pull Request #1598 · github/codeql-action

Update upload input values and logic #1598

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.

Sign up for GitHub

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
angelapwen merged 20 commits into github:main from angelapwen:upload-input-values
Mar 23, 2023

Uh oh!

There was an error while loading. Please reload this page.

Merged

Update upload input values and logic #1598

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9894ad1
Update upload input description in `analyze`
angelapwen Mar 21, 2023
4052ce5
Update failed runs' upload SARIF logic
angelapwen Mar 21, 2023
a99d06f
Update green runs' upload SARIF logic
angelapwen Mar 21, 2023
452dc6e
Add test cases for `failure-only`, `never`, and unrecognized input
angelapwen Mar 21, 2023
cb6d164
Minor refactoring
angelapwen Mar 21, 2023
8075d10
Replace `false` with `never` in existing checks
angelapwen Mar 21, 2023
7676afe
Fall back to `always` for unrecognized input
angelapwen Mar 22, 2023
fb18766
Add CHANGELOG entry
angelapwen Mar 22, 2023
04e3995
Add unit tests for always, true, false cases
angelapwen Mar 22, 2023
3270250
Clarify CHANGELOG and Action input description
angelapwen Mar 22, 2023
7e7bc84
Specify upload skips rather than fails in test
angelapwen Mar 22, 2023
cde6edb
Refactor relevant into helper method
angelapwen Mar 22, 2023
2a441e3
Further documentation improvements
angelapwen Mar 22, 2023
690a1ab
Update input description to match existing ones
angelapwen Mar 22, 2023
13a94c3
Refactor utility function per PR review
angelapwen Mar 22, 2023
4469ee6
Refactor test cases into loop
angelapwen Mar 22, 2023
707a6bb
Make `getUploadValue` synchronous
angelapwen Mar 23, 2023
7929472
Update comment
angelapwen Mar 23, 2023
54e08db
Use switch statement
angelapwen Mar 23, 2023
532e9ec
Stop `await`ing non async function
angelapwen Mar 23, 2023
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

2 changes: 1 addition & 1 deletion 2 .github/query-filter-test/action.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: false
upload: never
env:
CODEQL_ACTION_TEST_MODE: "true"
- name: Check SARIF
Expand Down
2 changes: 1 addition & 1 deletion 2 .github/workflows/__javascript-source-root.yml
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 1 addition & 1 deletion 2 .github/workflows/__upload-ref-sha-input.yml
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 1 addition & 1 deletion 2 .github/workflows/__with-checkout-path.yml
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 1 addition & 1 deletion 2 .github/workflows/expected-queries-runs.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: false
upload: never

- name: Check Sarif
uses: ./../action/.github/check-sarif
Expand Down
7 changes: 7 additions & 0 deletions 7 CHANGELOG.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ No user facing changes.
## 2.2.8 - 22 Mar 2023

- Update default CodeQL bundle version to 2.12.5. [#1585](https://github.com/github/codeql-action/pull/1585)
- Customers post-processing the SARIF output of the `analyze` Action before uploading it to Code Scanning will benefit from an improved debugging experience. [#1598](https://github.com/github/codeql-action/pull/1598)
- The CodeQL Action will now upload a SARIF file with debugging information to Code Scanning on failed runs for customers using `upload: false`. Previously, this was only available for customers using the default value of the `upload` input.
- The `upload` input to the `analyze` Action now accepts the following values:
- `always` is the default value, which uploads the SARIF file to Code Scanning for successful and failed runs.
- `failure-only` is recommended for customers post-processing the SARIF file before uploading it to Code Scanning. This option uploads debugging information to Code Scanning for failed runs to improve the debugging experience.
- `never` avoids uploading the SARIF file to Code Scanning even if the code scanning run fails. This is not recommended for external users since it complicates debugging.
- The legacy `true` and `false` options will be interpreted as `always` and `failure-only` respectively.

## 2.2.7 - 15 Mar 2023

Expand Down
8 changes: 6 additions & 2 deletions 8 analyze/action.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ inputs:
required: false
default: "../results"
upload:
description: Upload the SARIF file to Code Scanning
description: >-
Upload the SARIF file to Code Scanning.
Defaults to 'always' which uploads the SARIF file to Code Scanning for successful and failed runs.
'failure-only' only uploads debugging information to Code Scanning if the workflow run fails, for users post-processing the SARIF file before uploading it to Code Scanning.
'never' avoids uploading the SARIF file to Code Scanning, even if the code scanning run fails. This is not recommended for external users since it complicates debugging.
required: false
# If changing this, make sure to update workflow.ts accordingly.
default: "true"
default: "always"
cleanup-level:
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --mode flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
required: false
Expand Down
20 changes: 19 additions & 1 deletion 20 lib/actions-util.js
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 1 addition & 1 deletion 2 lib/actions-util.js.map
Show comments
View file
Open in desktop

Large diffs are not rendered by default.

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

3 changes: 2 additions & 1 deletion 3 lib/analyze-action.js
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.