python-zulip-api icon indicating copy to clipboard operation
python-zulip-api copied to clipboard

Remove use of removed !avatar syntax from API bots

Open timabbott opened this issue 5 years ago • 24 comments

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([email protected]) **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([email protected]) 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([email protected]) 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([email protected]) 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([email protected]) **foo** won! :tada:',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:            self.verify_response('move 3', '!avatar([email protected]) **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([email protected]) It\'s **test-bot**\'s (:red_circle:) turn.',
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar([email protected])\n\
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar([email protected])
zulip_bots/zulip_bots/bots/game_handler_bot/test_game_handler_bot.py:> !avatar([email protected])
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.

timabbott avatar Nov 07 '20 00:11 timabbott

@zulipbot claim

RioAtHome avatar Nov 25 '20 01:11 RioAtHome

@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...

m-e-l-u-h-a-n avatar Dec 06 '20 10:12 m-e-l-u-h-a-n

@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!

RioAtHome avatar Dec 07 '20 17:12 RioAtHome

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

m-e-l-u-h-a-n avatar Dec 08 '20 07:12 m-e-l-u-h-a-n

@zulipbot claim

vinitwadgaonkar avatar Jan 02 '21 15:01 vinitwadgaonkar

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)!

zulipbot avatar Jan 02 '21 15:01 zulipbot

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

vinitwadgaonkar avatar Jan 04 '21 09:01 vinitwadgaonkar

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

vinitwadgaonkar avatar Jan 04 '21 09:01 vinitwadgaonkar

zulipbot

vinitwadgaonkar avatar Jan 04 '21 10:01 vinitwadgaonkar

@zulipbot

vinitwadgaonkar avatar Jan 04 '21 10:01 vinitwadgaonkar

@zulipbot pull request

vinitwadgaonkar avatar Jan 04 '21 10:01 vinitwadgaonkar

please review and merge following pull request for this issue: #642 #641

vinitwadgaonkar avatar Jan 07 '21 03:01 vinitwadgaonkar

please review and merge following pull request for this issue: #P642 #P641

@neiljp @timabbott sir please review

vinitwadgaonkar avatar Jan 17 '21 13:01 vinitwadgaonkar

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.

RioAtHome avatar Jan 17 '21 22:01 RioAtHome

@zulipbot claim

ahmedabuamra avatar Feb 03 '21 21:02 ahmedabuamra

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 avatar Feb 03 '21 21:02 zulipbot

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!

zulipbot avatar Mar 07 '21 01:03 zulipbot

@zulipbot claim

gvarun1 avatar Jun 15 '21 16:06 gvarun1

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 avatar Jun 15 '21 16:06 zulipbot

@zulipbot claim

gvarun1 avatar Jun 15 '21 16:06 gvarun1

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 avatar Jun 15 '21 16:06 zulipbot

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 avatar Jun 15 '21 16:06 zulipbot