Skip to content

assert request params in code_scanning_test - #94

Merged
juruen merged 1 commit into
mainfrom
juruen/code-scanning-assert
Apr 4, 2025
Merged

assert request params in code_scanning_test#94
juruen merged 1 commit into
mainfrom
juruen/code-scanning-assert

Conversation

@juruen

Copy link
Copy Markdown
Collaborator

Context

This makes use of the new helper functionality to assert the right code scanning parameters are passed to the GH API request.

CopilotAI review requested due to automatic review settings April 4, 2025 08:45

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 updates the code scanning alerts test to assert that the expected query parameters are included in the GitHub API request.

  • Replaces mock.WithRequestMatch with mock.WithRequestMatchHandler to allow for more flexible request matching.
  • Introduces the expectQueryParams helper to assert that parameters "ref", "state", and "severity" are correctly set.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@williammartinwilliammartin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM thanks!

@juruen
juruen merged commit e267a3c into mainApr 4, 2025
@juruen
juruen deleted the juruen/code-scanning-assert branch April 4, 2025 09:35
Sign up for freeto 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.

3 participants

@juruen@williammartin