Skip to content

Commit e906af8

Browse files
committed
Merge branch 'pull_request_conversation_1' into pull_request_conversation_2
2 parents d5e852e + 9eb2532 commit e906af8

File tree

4 files changed

+625
-296
lines changed

4 files changed

+625
-296
lines changed

packages/slackBotFunction/app/slack/slack_events.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,9 @@ def process_async_slack_action(body: Dict[str, Any], client: WebClient) -> None:
244244
client=client,
245245
)
246246
# Only post message if storage succeeded
247-
post_params = {"channel": feedback_data["ch"], "text": response_message}
248-
if feedback_data.get("tt"): # Only add thread_ts if it exists (not for DMs)
249-
post_params["thread_ts"] = feedback_data["tt"]
250-
client.chat_postMessage(**post_params)
247+
client.chat_postMessage(
248+
channel=feedback_data["ch"], text=response_message, thread_ts=feedback_data.get("tt")
249+
)
251250
except ClientError as e:
252251
if e.response.get("Error", {}).get("Code") == "ConditionalCheckFailedException":
253252
# Silently ignore duplicate votes - user already voted on this message

packages/slackBotFunction/tests/test_async_processing.py

Lines changed: 0 additions & 291 deletions
This file was deleted.

packages/slackBotFunction/tests/test_forward_to_lambda.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def client_side_effect(service_name, *args, **kwargs):
122122
with patch("app.utils.handler_utils.get_pull_request_lambda_arn") as mock_get_pull_request_lambda_arn:
123123
mock_get_pull_request_lambda_arn.side_effect = Exception("Error getting lambda arn")
124124
with pytest.raises(Exception):
125-
forward_event_to_pull_request_lambda(pull_request_id="123", event=event_data, event_id="evt123")
125+
forward_event_to_pull_request_lambda(
126+
pull_request_id="123", event=event_data, event_id="evt123", store_pull_request_id=False
127+
)
126128

127129
# assertions
128130

0 commit comments

Comments
 (0)