Skip to content

assert request params in code_scanning_test #94

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

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

juruen
Copy link
Collaborator

@juruen juruen commented Apr 4, 2025

Context

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

@Copilot Copilot AI review requested due to automatic review settings April 4, 2025 08:45
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 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

Copy link
Collaborator

@williammartin williammartin left a comment

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 main Apr 4, 2025
16 checks passed
@juruen juruen deleted the juruen/code-scanning-assert branch April 4, 2025 09:35
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull request Apr 12, 2025
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.

2 participants