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 — Use `uploadSarif` rather than `uploadFiles` in `analyze` action by mbg · Pull Request #3206 · github/codeql-action

Conversation

@mbg

@mbg mbg commented Oct 14, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This replaces the two calls to uploadFiles in the analyze action with one call to uploadSarif. We introduced uploadSarif in #3167 for the upload-sarif action. Using uploadSarif here means that we no longer use different implementations of the same logic in analyze and upload-sarif.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk:

Which use cases does this change impact?

  • Advanced setup - Impacts users who have custom workflows.
  • Default setup - Impacts users who use default setup.
  • Code Scanning - Impacts Code Scanning (i.e. analysis-kinds: code-scanning).
  • Code Quality - Impacts Code Quality (i.e. analysis-kinds: code-quality).
  • GHES - Impacts GitHub Enterprise Server.

How did/will you validate this change?

  • Test repository - This change will be tested on a test repository before merging.
  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • FF
  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Sorry, something went wrong.

Uh oh!

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

All reactions
@mbg
Use uploadSarif rather than uploadFiles in analyze action
2ade8a0
@mbg
mbg requested a review from a team as a code owner October 14, 2025 18:53
@mbg
mbg marked this pull request as draft October 14, 2025 18:56
@mbg
mbg marked this pull request as ready for review October 21, 2025 22:54
Copilot AI review requested due to automatic review settings October 21, 2025 22:54
Copilot AI reviewed Oct 21, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Pull Request Overview

This PR refactors the analyze action to use the uploadSarif function instead of making separate calls to uploadFiles for Code Scanning and Code Quality analyses. The change consolidates SARIF upload logic that was previously duplicated between the analyze and upload-sarif actions.

Key changes:

  • Replaces two separate uploadFiles calls with a single uploadSarif call that handles both Code Scanning and Code Quality uploads
  • Changes the upload result tracking from a single UploadResult to a record mapping analysis kinds to their respective results
  • Updates all references to the upload results throughout the action to access the appropriate analysis kind

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/analyze-action.ts Refactors upload logic to use uploadSarif and updates result handling to work with grouped results by analysis kind
lib/analyze-action.js Generated JavaScript code reflecting the TypeScript changes, including new helper functions for SARIF file grouping

Sorry, something went wrong.

Uh oh!

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

All reactions
@mbg
mbg requested a review from henrymercer October 21, 2025 22:55
@mbg mbg mentioned this pull request Oct 21, 2025
Perform SARIF post-processing independently of upload #3222
Merged
@mbg
Merge branch 'main' into mbg/analyze/use-upload-sarif
aa048ac
@github-actions github-actions Bot added the size/S Should be easy to review label Oct 21, 2025
esbena
esbena previously approved these changes Oct 22, 2025
View reviewed changes

@esbena esbena left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM, with one optional code style comment.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/analyze-action.ts Resolved

Uh oh!

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

@mbg
Fix style inconsistency
02b2c3a
@mbg
mbg dismissed esbena’s stale review via 02b2c3a October 22, 2025 11:04
@mbg
mbg requested a review from esbena October 22, 2025 11:06
esbena
esbena previously approved these changes Oct 22, 2025
View reviewed changes
henrymercer
henrymercer reviewed Oct 22, 2025
View reviewed changes
Comment thread src/analyze-action.ts Resolved

Uh oh!

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

Comment thread src/analyze-action.ts Resolved

Uh oh!

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

Comment thread src/analyze-action.ts Resolved

Uh oh!

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

mbg added 2 commits October 22, 2025 15:49
@mbg
Add AnalyzeUseNewUpload feature
f88cb01
@mbg
Gate uploadSarif behind FF, use old implementation otherwise
b7c814c
@mbg
mbg dismissed esbena’s stale review via b7c814c October 22, 2025 14:55
@mbg
mbg requested a review from henrymercer October 22, 2025 15:07
mbg added 2 commits October 22, 2025 16:12
@mbg
Use checkoutPath and category constants consistently
c98d5a9
@mbg
Address review comments
ebd514f
henrymercer
henrymercer approved these changes Oct 22, 2025
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

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.

This looks good. Thanks for adding the feature flag. I think you can update the classification in the PR description to low risk now.

Sorry, something went wrong.

Uh oh!

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

All reactions
@mbg
mbg merged commit 4264208 into main Oct 22, 2025
@mbg
mbg deleted the mbg/analyze/use-upload-sarif branch October 22, 2025 16:45
This was referenced Oct 24, 2025
Merge main into releases/v4 #3235
Merged
Merge releases/v4 into releases/v3 #3237
Merged
@mbg mbg mentioned this pull request Nov 17, 2025
Remove AnalyzeUseNewUpload FF and make its behaviour the default #3309
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@henrymercer henrymercer henrymercer approved these changes
@esbena esbena esbena left review comments

Uh oh!

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

Assignees

No one assigned

Labels

size/S Should be easy to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@mbg @esbena @henrymercer
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.