zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
350 stars 356 forks source link

Remove use of removed !avatar syntax from API bots #632

Open timabbott opened 3 years ago

timabbott commented 3 years ago

Apparently, we have a few integrations that are using the !avatar markdown syntax that we removed some time ago:

tabbott@coset:~/python-zulip-api$ git grep '!avatar'
zulip/integrations/git/post-receive:            commits += '!avatar(%s) %s\n' % (author_email, subject)
zulip/integrations/git/zulip_git_config.py:# return '!avatar(%s) [%s](https://example.com/commits/%s)\n' % (author, subject, commit_id)
zulip/integrations/git/zulip_git_config.py:    return '!avatar(%s) %s\n' % (author, subject)
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:            'quit', 'Game cancelled.\n!avatar(foo@example.com) **foo** quit.', 0, bot, 'foo')
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:        self.verify_response('move 3', '**foo** moved in column 3\n\nfoo\n\n!avatar(baz@example.com) It\'s **baz**\'s (:red_circle:) turn.',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:        self.verify_response('move 3', '**baz** moved in column 3\n\nfoo\n\n!avatar(foo@example.com) It\'s **foo**\'s (:blue_circle:) turn.',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:        self.verify_response('move 5', '!avatar(foo@example.com) It\'s **foo**\'s (:blue_circle:) turn.', 0,
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:            self.verify_response('move 3', '!avatar(foo@example.com) **foo** won! :tada:',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:            self.verify_response('move 3', '!avatar(foo@example.com) **foo** won! :tada:',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:        self.verify_response('move 3', '**foo** moved in column 3\n\nfoo\n\n!avatar(test-bot@example.com) It\'s **test-bot**\'s (:red_circle:) turn.',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar(foo@example.com)\n\
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar(foo@example.com)
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar(bar@example.com)
zulip_bots/zulip_bots/game_handler.py:        sender_avatar = "!avatar({})".format(sender)
zulip_bots/zulip_bots/game_handler.py:        player_avatar = "!avatar({})".format(player_email)
zulip_bots/zulip_bots/game_handler.py:                user_turn_avatar = "!avatar({})".format(self.players[self.turn])
zulip_bots/zulip_bots/game_handler.py:        user_turn_avatar = "!avatar({})".format(self.players[self.turn])
zulip_bots/zulip_bots/game_handler.py:            user_turn_avatar = "!avatar({})".format(self.players[self.turn])
zulip_bots/zulip_bots/game_handler.py:            winner_avatar = "!avatar({})".format(winner)

The Git integration is the most important; we should migrate it to use the same formatting model we have for the GitHub/GitLab integrations in the webapp.

For the game handler, I suspect we want to just switch to using names, but if that's problematic, we could consider adding a new "show user avatar" syntax that is more HTML-like, e.g. an <avatar> tag.

RioAtHome commented 3 years ago

@zulipbot claim

m-e-l-u-h-a-n commented 3 years ago

@mateuszmandera how can I know about formatting model for github/gitlab integrations, in order perfrom this migration for Git integration. Also can I work on this issue...

RioAtHome commented 3 years ago

@m-e-l-u-h-a-n hey, i kinda gave up on it from not knowing where to find the github integration, but if you want to work on it, maybe check zulip main repository, and find the webhooks for github/gitlabs, they might have the desired formatting, im not an expert on this , so take what i said with a grain of salt, goodluck!

m-e-l-u-h-a-n commented 3 years ago

Thanks! @R0cker77, for suggestion will try my best!

vinitwadgaonkar commented 3 years ago

@zulipbot claim

zulipbot commented 3 years ago

Welcome to Zulip, @vinitwadgaonkar! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

vinitwadgaonkar commented 3 years ago

can anybody please brief me little what exactly is needed to be done in this issue

vinitwadgaonkar commented 3 years ago

am i supposed to replace !avatar expression with its html tag

vinitwadgaonkar commented 3 years ago

zulipbot

vinitwadgaonkar commented 3 years ago

@zulipbot

vinitwadgaonkar commented 3 years ago

@zulipbot pull request

vinitwadgaonkar commented 3 years ago

please review and merge following pull request for this issue:

642

641

vinitwadgaonkar commented 3 years ago

please review and merge following pull request for this issue:

P642

P641

@neiljp @timabbott sir please review

RioAtHome commented 3 years ago

Hey @vinitwadgaonkar, you should check the Zulip community, to discuss the issues that your having, and getting code reviews. in general the community have a better respond time.

ahmedabuamra commented 3 years ago

@zulipbot claim

zulipbot commented 3 years ago

Welcome to Zulip, @ahmedabuamra! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zulipbot commented 3 years ago

Hello @ahmedabuamra, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue?

If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days.

If you've decided to work on something else, simply comment @zulipbot abandon so that someone else can claim it and continue from where you left off.

Thank you for your valuable contributions to Zulip!

gvarun1 commented 3 years ago

@zulipbot claim

zulipbot commented 3 years ago

Hello @gvarun1, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

gvarun1 commented 3 years ago

@zulipbot claim

zulipbot commented 3 years ago

Hello @gvarun1, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

zulipbot commented 3 years ago

Hello @gvarun1, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!