Feat: wire first modernized feature to platforms providers #1078
+158
−159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
This pull request refactors how the SRE module's geolocation functionality is integrated and registered, moving away from a legacy command provider approach to a more unified, platform-agnostic command registration system. It also enhances the geolocation Slack output and improves platform provider initialization. The main changes are grouped below:
SRE Geolocation Command Refactoring
GeolocateProviderclass and its direct registration as a Slack subcommand, along with its helper module and related unit/integration tests. This eliminates the old, Slack-specific way of handling the/sre geolocatecommand and its associated test coverage. [1] [2] [3] [4] [5] [6]modules/sre/__init__.py, using hooks to register commands for Slack, Teams, and Discord.Command Dispatching and Routing
_dispatch_platform_commandfunction to the SRE module, which dynamically dispatches subcommands to the appropriate platform provider, improving extensibility and decoupling command handling from Slack-specific logic. The main/srecommand handler now uses this dispatcher before falling back to the legacy router. [1] [2]Platform Provider Initialization
Geolocation Slack Output Improvement
Minor Improvements
These changes modernize the SRE module's command handling, improve maintainability, and enhance the user experience for geolocation commands across multiple platforms.