Rename default branch to ‘main’

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-08-24 12:50:52 -07:00
parent 285a946a1f
commit 53e59c8c09
13 changed files with 39 additions and 39 deletions

View file

@ -7,7 +7,7 @@
# stdin in the form
# <oldrev> <newrev> <refname>
# For example:
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/main
import os
import os.path

View file

@ -19,12 +19,12 @@ ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
# Returns a dictionary encoding the stream and subject to send the
# notification to (or None to send no notification).
#
# The default code below will send every commit pushed to "master" to
# The default code below will send every commit pushed to "main" to
# * stream "commits"
# * topic "master"
# * topic "main"
# And similarly for branch "test-post-receive" (for use when testing).
def commit_notice_destination(repo: str, branch: str, commit: str) -> Optional[Dict[str, str]]:
if branch in ["master", "test-post-receive"]:
if branch in ["main", "test-post-receive"]:
return dict(stream=STREAM_NAME, subject=f"{branch}")
# Return None for cases where you don't want a notice sent