Skip to content
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

Add regex-based extension filtering using environment variable #541

Merged
merged 3 commits into from
Jan 26, 2025

Conversation

github-actions[bot]
Copy link
Contributor

This message was generated by git-bob (version: 0.18.0dev, model: claude-3-5-sonnet-20241022, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

I implemented a new feature to filter entry points based on their module names using regular expressions. The filter pattern can be specified through the environment variable GIT_BOB_EXTENSIONS_FILTER_REGEXP. By default, all modules are accepted using the pattern ".*". This change affects both the init_prompt_handlers and init_triggers functions in _terminal.py, allowing users to selectively load only the extensions they need by specifying a regex pattern. The implementation is minimal and maintains backward compatibility while adding this new filtering capability.

  • src/git_bob/_terminal.py Added regex-based module filtering using GIT_BOB_EXTENSIONS_FILTER_REGEXP environment variable.

closes #540

Copy link

codecov bot commented Jan 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.00%. Comparing base (ec0f98a) to head (835f9ff).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #541   +/-   ##
=======================================
  Coverage   59.00%   59.00%           
=======================================
  Files          14       14           
  Lines        1815     1815           
=======================================
  Hits         1071     1071           
  Misses        744      744           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haesleinhuepf haesleinhuepf merged commit 843f0f7 into main Jan 26, 2025
4 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.

Filter extensions
1 participant