mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
webhooks: Rename *topic local variables to *topic_name.
This is preparatory work towards adding a Topic model. We plan to use the local variable name as 'topic' for the Topic model objects. Currently, we use *topic as the local variable name for topic names. We rename local variables of the form *topic to *topic_name so that we don't need to think about type collisions in individual code paths where we might want to talk about both Topic objects and strings for the topic name.
This commit is contained in:
committed by
Tim Abbott
parent
030f899195
commit
3afc8ed7ae
@@ -828,7 +828,7 @@ def api_github_webhook(
|
||||
# for events that are valid but not yet handled by us.
|
||||
# See IGNORED_EVENTS, for example.
|
||||
return json_success(request)
|
||||
topic = get_topic_based_on_type(payload, event)
|
||||
topic_name = get_topic_based_on_type(payload, event)
|
||||
|
||||
body_function = EVENT_FUNCTION_MAPPER[event]
|
||||
|
||||
@@ -839,7 +839,7 @@ def api_github_webhook(
|
||||
)
|
||||
body = body_function(helper)
|
||||
|
||||
check_send_webhook_message(request, user_profile, topic, body, event)
|
||||
check_send_webhook_message(request, user_profile, topic_name, body, event)
|
||||
return json_success(request)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user