Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SentryAppActionHandler(ActionHandler):
"description": "The configuration schema for a Sentry App Action",
"type": "object",
"properties": {
"target_identifier": {"type": ["string"]},
"target_identifier": {"type": ["string"], "pattern": "^[0-9]+$"},
"target_display": {"type": ["string", "null"]},
"target_type": {
"type": ["integer"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,31 @@ def test_update_add_sentry_app_action(self) -> None:
}
assert action.data["settings"] == self.sentry_app_settings

def test_update_rejects_non_numeric_sentry_app_target_identifier(self) -> None:
self.valid_workflow["actionFilters"] = [
{
"logicType": "any",
"conditions": [],
"actions": [
{
"config": {
"targetIdentifier": str(self.sentry_app_installation.uuid),
"targetType": ActionType.SENTRY_APP,
},
"data": {"settings": self.sentry_app_settings},
"type": Action.Type.SENTRY_APP,
},
],
}
]

self.get_error_response(
self.organization.slug,
self.workflow.id,
raw_data=self.valid_workflow,
status_code=400,
)

def test_update_triggers_with_empty_conditions(self) -> None:
"""Test that passing an empty list to triggers.conditions clears all conditions"""
# Create a workflow with a trigger condition
Expand Down
Loading