Skip to content

Conversation

@mbg
Copy link
Member

@mbg mbg commented Oct 27, 2025

This PR removes the add-snippets input from the analyze action. This input has been deprecated since CodeQL Action 3.26.4 in August 2024 when this removal was announced.

Risk assessment

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

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

  • Advanced setup - Impacts users who have custom workflows.
  • 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?

  • 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?

  • 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.

@mbg mbg requested a review from a team as a code owner October 27, 2025 12:54
Copilot AI review requested due to automatic review settings October 27, 2025 12:54
@github-actions github-actions bot added the size/S Should be easy to review label Oct 27, 2025
Copy link
Contributor

Copilot AI left a 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 removes the deprecated add-snippets input from the analyze action, which has been deprecated since CodeQL Action 3.26.4 in August 2024. The removal cleans up the codebase by eliminating the associated input parameter, helper function, and all references throughout the action's implementation.

Key changes:

  • Removed the add-snippets input definition from analyze/action.yml
  • Deleted the getAddSnippetsFlag() utility function and its tests
  • Removed the addSnippetsFlag parameter from runQueries() and databaseInterpretResults() functions and all their call sites
  • Updated CHANGELOG.md to document this breaking change

Reviewed Changes

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

Show a summary per file
File Description
analyze/action.yml Removed the deprecated add-snippets input definition
src/util.ts Removed the getAddSnippetsFlag() helper function
src/util.test.ts Removed tests for the deleted getAddSnippetsFlag() function
src/codeql.ts Removed addSnippetsFlag parameter from databaseInterpretResults() interface and implementation
src/analyze.ts Removed addSnippetsFlag parameter from runQueries() function signature
src/analyze-action.ts Removed the call to getAddSnippetsFlag() when invoking runQueries()
src/analyze.test.ts Removed addSnippetsFlag variable and parameter from test
src/analyze-action-input.test.ts Updated argument index in test assertion after parameter removal
src/analyze-action-env.test.ts Updated argument index in test assertion after parameter removal
CHANGELOG.md Added entry documenting the removal of the add-snippets input
lib/*.js Generated JavaScript code reflecting the TypeScript changes

Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of folks won't see the changelog, so perhaps it makes sense to create a warning when the input is specified to inform users that it is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Should be easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants