Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
timabbott opened this issue Nov 7, 2020 · 24 comments · May be fixed by #649
Open

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

timabbott opened this issue Nov 7, 2020 · 24 comments · May be fixed by #649

Comments

@timabbott
Copy link
Member

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
Copy link
Collaborator

@zulipbot claim

@m-e-l-u-h-a-n
Copy link
Member

@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
Copy link
Collaborator

@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
Copy link
Member

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

@vinitwadgaonkar
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Jan 2, 2021

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
Copy link
Collaborator

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

@vinitwadgaonkar
Copy link
Collaborator

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

@vinitwadgaonkar
Copy link
Collaborator

zulipbot

@vinitwadgaonkar
Copy link
Collaborator

@zulipbot

@vinitwadgaonkar
Copy link
Collaborator

@zulipbot pull request

This was referenced Jan 4, 2021
@vinitwadgaonkar
Copy link
Collaborator

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

@vinitwadgaonkar
Copy link
Collaborator

vinitwadgaonkar commented Jan 17, 2021

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

@neiljp @timabbott sir please review

@RioAtHome
Copy link
Collaborator

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.

@vinitwadgaonkar vinitwadgaonkar removed their assignment Jan 27, 2021
@ahmedabuamra
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Feb 3, 2021

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

ahmedabuamra added a commit to ahmedabuamra/python-zulip-api that referenced this issue Feb 5, 2021
The issue linked to this commit suggest suggests to replace the avatar with the
username only, I just needed to remove !avatar as the code already shows username.

Fixes: zulip#632
ahmedabuamra added a commit to ahmedabuamra/python-zulip-api that referenced this issue Feb 5, 2021
…ead.

Getting the logs run in cmd as in function `git_commit_range(oldrev, newrev)`
so I had to prefix author name with -[AUTHOR], commit with -[COMMIT]
and subject/title with -[SUBJECT] to be able to extract these info correctly.

I also tried to stick with the format proposed in this issue
zulip/zulip#3968 except for showing the author's
name before each commit and without summary.

Fixes: zulip#632
ahmedabuamra added a commit to ahmedabuamra/python-zulip-api that referenced this issue Feb 5, 2021
…ead.

Getting the logs run in cmd as in function `git_commit_range(oldrev, newrev)`
so I had to prefix author name with -[AUTHOR], commit with -[COMMIT]
and subject/title with -[SUBJECT] to be able to extract these info correctly.

I also tried to stick with the format proposed in this issue
zulip/zulip#3968 except for showing the author's
name before each commit and without summary.

Fixes: zulip#632
timabbott pushed a commit that referenced this issue Feb 19, 2021
The issue linked to this commit suggest suggests to replace the avatar
with the username only, I just needed to remove !avatar as the code
already shows the username.

Fixes part of #632.
@zulipbot
Copy link
Member

zulipbot commented Mar 7, 2021

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
Copy link
Collaborator

gvarun1 commented Jun 15, 2021

@zulipbot claim

@zulipbot
Copy link
Member

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
Copy link
Collaborator

gvarun1 commented Jun 15, 2021

@zulipbot claim

@zulipbot
Copy link
Member

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!

1 similar comment
@zulipbot
Copy link
Member

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!

@anssakthi
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @anssakthi! 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)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants