chore: Prevent crash when empty channel is defined in the slack map - #65
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6746655c65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case {"review": {"id": "", **_rest}}: | ||
| print(f"Info: Empty channel id for {team}, notifications suppressed") |
There was a problem hiding this comment.
Preserve empty-channel mappings to suppress notifications
For a team whose map entry has review.id: '', this branch only logs suppression and leaves the team out of team_to_channel. Downstream, both _resolve_target_channels and get_channels_for_requested_teams treat missing teams as unmapped and fall back to SLACK_CHANNEL_ID/default_channel_id, so an explicitly suppressed requested team with a non-empty default channel will still get notifications in the default channel. Store an explicit None/sentinel for suppressed teams (and have callers honor it) instead of making them indistinguishable from unknown teams.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is not a big deal we can leave with it.
|
What does this PR do?
Motivation
Maintenance
Describe how you validated your changes
Added some unit tests
Additional Notes