Skip to content

Commit 8dda448

Browse files
committed
integrations: Update "stream", "subject" occurrences in Git integration.
The config file is user facing, hence it needs to be updated, for the integration doc to be updated.
1 parent 8c27331 commit 8dda448

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: zulip/integrations/git/post-receive

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def send_bot_message(oldrev: str, newrev: str, refname: str) -> None:
9090

9191
message_data = {
9292
"type": "stream",
93-
"to": destination["stream"],
94-
"subject": destination["subject"],
93+
"to": destination["channel"],
94+
"topic": destination["topic"],
9595
"content": message,
9696
}
9797
client.send_message(message_data)

Diff for: zulip/integrations/git/zulip_git_config.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
22
from typing import Dict, Optional
33

4-
# Name of the stream to send notifications to, default is "commits"
5-
STREAM_NAME = "commits"
4+
# Name of the channel to send notifications to, default is "commits"
5+
CHANNEL_NAME = "commits"
66

77
# Change these values to configure authentication for the plugin
88
ZULIP_USER = "[email protected]"
@@ -17,16 +17,16 @@
1717
# * branch = the name of the branch that was pushed to
1818
# * commit = the commit id
1919
#
20-
# Returns a dictionary encoding the stream and subject to send the
20+
# Returns a dictionary encoding the channel and topic to send the
2121
# notification to (or None to send no notification).
2222
#
2323
# The default code below will send every commit pushed to "main" to
24-
# * stream "commits"
24+
# * channel "commits"
2525
# * topic "main"
2626
# And similarly for branch "test-post-receive" (for use when testing).
2727
def commit_notice_destination(repo: str, branch: str, commit: str) -> Optional[Dict[str, str]]:
2828
if branch in ["main", "master", "test-post-receive"]:
29-
return dict(stream=STREAM_NAME, subject=f"{branch}")
29+
return dict(channel=CHANNEL_NAME, topic=f"{branch}")
3030

3131
# Return None for cases where you don't want a notice sent
3232
return None

0 commit comments

Comments
 (0)