Skip to content

Commit f945c4f

Browse files
authored
integrations: Remove deprecated !avatar syntax from git integration.
The !avatar() markdown syntax was removed from Zulip some time ago, but was still being used in the git integration. This commit replaces all remaining uses with plain text formatting. Fixes: #632
1 parent 9960360 commit f945c4f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

zulip/integrations/git/post-receive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def git_commit_range(oldrev: str, newrev: str) -> str:
4747
if hasattr(config, "format_commit_message"):
4848
commits += config.format_commit_message(author_email, subject, commit_id)
4949
else:
50-
commits += f"!avatar({author_email}) {subject}\n"
50+
commits += f"* {subject} (by {author_email})\n"
5151
return commits
5252

5353

zulip/integrations/git/zulip_git_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def commit_notice_destination(repo: str, branch: str, commit: str) -> Optional[D
3636
# common customization is to include a link to the commit in your
3737
# graphical repository viewer, e.g.
3838
#
39-
# return '!avatar(%s) [%s](https://example.com/commits/%s)\n' % (author, subject, commit_id)
39+
# return '* [%s](https://example.com/commits/%s) (by %s)\n' % (subject, commit_id, author)
4040
def format_commit_message(author: str, subject: str, commit_id: str) -> str:
41-
return f"!avatar({author}) {subject}\n"
41+
return f"* {subject} (by {author})\n"
4242

4343

4444
## If properly installed, the Zulip API should be in your import

0 commit comments

Comments
 (0)