Skip to content

feat(provider)!: positioned wildcard matching #119

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 15 commits into from
May 21, 2025

Conversation

miquelbeltran
Copy link
Contributor

Description 📝

Purpose:

Adds support to positioned wildcard matching.

Approach:

Use the * position to match the keys.

  • foo* matches foobar but not barfoobar
  • *foo matches barfoo but not barfoobar
  • *foo* matches foobar, barfoo and barfoobar
  • foo matches foo and nothing else

Type of change

  • fix: Bug fix (non-breaking change which fixes an issue)
  • feat: New feature (non-breaking change which adds functionality)
  • chore: Chore task, release or small impact change
  • ci: CI configuration change
  • Other type of change (specify)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Updates

  • Implemented wildcard matching in filter_keys
  • Created unit tests for all types of wildcard matching

Related issues

Test plan 🧪

Author to check 👓

  • Project and all contained modules builds successfully
  • Self-/dev-tested
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Project and all contained modules builds successfully
  • Change has been dev-/reviewer-tested, where possible
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

@miquelbeltran miquelbeltran requested a review from Copilot May 20, 2025 07:55
Copy link

@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 adds support for positioned wildcard matching to the key filtering functionality, allowing flexible filtering patterns for sensitive data. Key changes include:

  • Splitting a generic wildcard test into dedicated tests for keys starting with, ending with, containing, or exactly matching the filter string.
  • Updating the filter_keys function to support different wildcard positions.
  • Enhancing the README documentation with clear examples of the new wildcard matching behavior.

Reviewed Changes

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

File Description
python3/tests/test_utilities.py Added dedicated tests for each wildcard matching pattern
python3/raygun4py/utilities.py Revised filter_keys implementation to handle positioned wildcard expressions
README.rst Updated documentation to explain the new wildcard matching patterns and examples

Copy link

@Olwiba Olwiba left a comment

Choose a reason for hiding this comment

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

All good, nice one 👍

@miquelbeltran miquelbeltran changed the base branch from 96-callback-docs to master May 21, 2025 05:52
@miquelbeltran miquelbeltran merged commit ee33543 into master May 21, 2025
8 checks passed
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.

feat: Support key filtering position
2 participants