Skip to content

Add new quality-queries input #2917

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add new quality-queries input #2917

wants to merge 4 commits into from

Conversation

mbg
Copy link
Member

@mbg mbg commented Jun 3, 2025

This PR adds a new quality-queries input to the init action. Fundamentally, this behaves the same as the queries input and propagates a list of queries to the CLI. The list of queries given in the quality-queries input is combined with the queries input and configuration file, as expected.

The intention here is that this will later allow us to filter SARIF results depending on which input the query responsible for the alert belongs to.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@mbg mbg marked this pull request as ready for review June 4, 2025 10:56
@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 10:56
@mbg mbg requested a review from a team as a code owner June 4, 2025 10:56
Copy link
Contributor

@Copilot 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 introduces a new quality-queries input to the init action and propagates it through configuration parsing and SARIF generation, enabling code quality queries to be combined and filtered alongside existing query inputs.

  • Adds quality-queries to init-action.ts and action.yml
  • Extends config-utils and codeql modules to parse and inject quality queries
  • Updates unit tests and generated workflows to cover the new input

Reviewed Changes

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

Show a summary per file
File Description
src/init-action.ts Propagate qualityQueriesInput from action inputs
src/config-utils.ts Extend calculateAugmentation and related interfaces
src/config-utils.test.ts Add qualityQueriesInput to test setup and cases
src/codeql.ts Inject qualityQueriesInput into SARIF config building
init/action.yml Declare new quality-queries input
pr-checks/checks/quality-queries.yml Add PR check workflow for quality queries
lib/init-action.js Build output for quality-queries handling
lib/config-utils.js Compiled parsing and augmentation updates
lib/config-utils.test.js Compiled test adjustments for quality queries
lib/codeql.js Compiled SARIF injection updates
.github/workflows/__quality-queries.yml Generated workflow for the new PR check
Comments suppressed due to low confidence (3)

src/config-utils.test.ts:860

  • Add a test case where both queries and quality-queries inputs are provided together (with and without + prefix) to verify that they merge correctly into the resulting queriesInput and qualityQueriesInput properties.
// (after existing tests for quality queries)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant