Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

@whitdog47 whitdog47 commented May 16, 2025

This PR updates the Slack payload model to accept numeric subject IDs by enabling Pydantic’s coercion of numbers to strings.

@whitdog47 whitdog47 requested review from Copilot and mvilanova May 16, 2025 00:37
@whitdog47 whitdog47 self-assigned this May 16, 2025
@whitdog47 whitdog47 added the bug Something isn't working label May 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Slack payload model to accept numeric subject IDs by enabling Pydantic’s coercion of numbers to strings.

  • Imported ConfigDict from Pydantic.
  • Added model_config on SubjectMetadata to coerce numeric IDs to strings.
Comments suppressed due to low confidence (2)

src/dispatch/plugins/dispatch_slack/models.py:41

  • No tests were added to verify that numeric subject IDs are correctly coerced to strings. Consider adding unit tests that pass numeric ID values to this model and validate that they become strings.
coerce_numbers_to_str=True

src/dispatch/plugins/dispatch_slack/models.py:37

  • The class docstring for SubjectMetadata doesn’t mention the new coercion behavior. Please update the docstring to explain that numeric IDs will be accepted and coerced to strings.
class SubjectMetadata(BaseModel):

@whitdog47 whitdog47 merged commit a722c84 into main May 16, 2025
11 checks passed
@whitdog47 whitdog47 deleted the fix/allow-numbers-as-id branch May 16, 2025 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants