Skip to content

Update Slack detection approach#136

Open
stephenyeargin wants to merge 1 commit into
stahnma:mainfrom
stephenyeargin:slack-detection
Open

Update Slack detection approach#136
stephenyeargin wants to merge 1 commit into
stahnma:mainfrom
stephenyeargin:slack-detection

Conversation

@stephenyeargin
Copy link
Copy Markdown

tl;dr Upgraded to Hubot v14 + supported Slack adapter, the adapterName value changed. Need this to keep Slack detection working.


This pull request refactors how the codebase detects and handles Slack adapters across multiple Hubot modules. It introduces a more robust and flexible isSlackAdapter utility to check for Slack adapters, improving compatibility with various adapter names and reducing hardcoded checks. The update also includes new and expanded tests to ensure correct behavior. Additionally, there are minor documentation and manifest improvements.

Slack Adapter Detection Refactor:

  • Added a flexible isSlackAdapter function in hubot-message-aggregator, hubot-slacklogs, and hubot-wisdom to detect Slack adapters by matching various possible adapter names, replacing previous strict equality checks. [1] [2] [3]
  • Updated initialization logic in hubot-message-aggregator, hubot-slacklogs, and hubot-wisdom to use the new isSlackAdapter function, ensuring Slack-specific logic only runs when appropriate. [1] [2] [3]

Testing Improvements:

  • Added comprehensive unit tests for isSlackAdapter and initialization logic in hubot-message-aggregator/test/aggregation-module.test.js to verify correct behavior for various adapter name scenarios. [1] [2] [3]

Dependency and Manifest Updates:

  • Marked acorn and eslint as peer dependencies in hubot-message-aggregator/package-lock.json for improved dependency management. [1] [2]
  • Updated .flox/env/manifest.toml to use schema-version instead of version for manifest compatibility.

Documentation:

  • Fixed a minor typo in README.md ("collegues" → "colleagues").

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.

1 participant