Conversation
- Added `ENABLED_PLUGINS` environment variable to control which plugins are loaded. - Introduced `PluginRegistry` service to manage enabled plugins. - Updated documentation in `CLAUDE.md` and `README.md` to reflect new configuration options. - Modified `bot.ts` to skip loading disabled plugins based on the registry.
- Modified the pre-commit script to include README.md in the list of files to be skipped during secret scanning, alongside SECURITY files and CLAUDE.md.
Summary of ChangesHello @sirkitree, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a plugin registry system, enabling dynamic control over which bot plugins are loaded via an environment variable. It includes the core logic, extensive testing, and updated documentation to support this new configurability. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a plugin registry system that allows selective enabling/disabling of bot plugins via the ENABLED_PLUGINS environment variable, making deployments more configurable for different environments and use cases.
- Added a
PluginRegistryservice to manage enabled plugins based on environment configuration - Integrated the plugin registry into the bot's plugin loading mechanism
- Enhanced documentation with detailed plugin configuration examples and usage scenarios
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/plugin-registry.ts | Core plugin registry implementation with environment variable parsing |
| src/services/tests/plugin-registry.test.ts | Comprehensive test suite covering all registry scenarios |
| src/bot.ts | Integration of plugin registry to filter loaded plugins |
| README.md | Added plugin configuration documentation and examples |
| CLAUDE.md | Updated technical documentation with registry details |
| .husky/pre-commit | Expanded documentation file exclusions for secret scanning |
| .env.defaults | Added ENABLED_PLUGINS example configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Code Review
This is a great addition that significantly improves the bot's configurability. The implementation is clean, and the inclusion of comprehensive tests and documentation is excellent. I have a few suggestions to enhance the robustness of the new plugin registry and to align with best practices for logging.
Addresses #171
This pull request introduces a configurable plugin registry system, allowing selective enabling or disabling of bot plugins via the new
ENABLED_PLUGINSenvironment variable. This makes it easier to tailor deployments for different environments, organizations, or testing scenarios. The implementation includes documentation updates, code changes to support the registry, and comprehensive tests for edge cases.Plugin Registry Implementation:
src/services/plugin-registry.ts, which provides thePluginRegistryclass and a singleton instance to manage enabled plugins based on theENABLED_PLUGINSenvironment variable. If the variable is unset or empty, all plugins are enabled by default.src/bot.tsto use the plugin registry when loading plugins, skipping any that are disabled according to the registry. [1] [2]Documentation Updates:
ENABLED_PLUGINSvariable inREADME.mdandCLAUDE.md, including lists of available plugins and configuration scenarios. [1] [2] [3] [4].env.defaultsto include theENABLED_PLUGINSvariable for reference.Testing:
src/services/__tests__/plugin-registry.test.tswith comprehensive tests covering all major scenarios, including unset, empty, and malformedENABLED_PLUGINSvalues, extension handling, and real-world deployment cases.Tooling/CI Improvements:
.husky/pre-committo skip secret scanning for documentation files such asREADME.mdandCLAUDE.md, preventing false positives from example patterns.