feat: support multiple channels in slack#54970
Merged
veryayskiy merged 3 commits intomasterfrom Apr 17, 2026
Merged
Conversation
Contributor
Prompt To Fix All With AIThis is a comment left during a code review.
Path: products/conversations/backend/api/tests/test_slack_multi_channel.py
Line: 42-79
Comment:
**Prefer parameterised tests for variations of the same scenario**
`test_top_level_in_first_configured_channel_creates_ticket`, `test_top_level_in_second_configured_channel_creates_ticket`, and `test_top_level_in_non_configured_channel_ignored` all set up the same two-channel config and differ only in the inbound channel and the expected outcome. The repo convention is to always prefer parameterised tests; `TestConfiguredSupportChannels` in the same file models this well.
```python
@parameterized.expand(
[
("first_channel_creates", "C_ALPHA", True),
("second_channel_creates", "C_BETA", True),
("unknown_channel_ignored", "C_UNKNOWN", False),
]
)
@patch("products.conversations.backend.slack.create_or_update_slack_ticket")
def test_top_level_message_routing(self, _name, channel, expect_create, mock_create):
self.team.conversations_settings = {
"slack_enabled": True,
"slack_channel_ids": ["C_ALPHA", "C_BETA"],
}
self.team.save()
handle_support_message(self._make_event(channel), self.team, "T1")
if expect_create:
mock_create.assert_called_once()
else:
mock_create.assert_not_called()
```
The same pattern could collapse `test_thread_reply_without_ticket_in_configured_channel_accepted` and `test_thread_reply_without_ticket_in_non_configured_channel_ignored` into a single parameterised test.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat: support multiple channels in slack" | Re-trigger Greptile |
Contributor
|
Size Change: +64 B (0%) Total Size: 130 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
No CODEOWNERS match and this is a behavioral change to business logic (ticket creation routing), data model (new JSON field), and internal API contracts (kea action renamed, new slack_channel_ids field). There are also zero human reviews — only a resolved bot comment from an older commit.
Contributor
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |
sortafreel
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Right now you can have only one channel in slack where every message become a ticket.
Changes
Change to multiple channels