Commit graph

349 commits

Author SHA1 Message Date
Anders Kaseorg
5f81eb3a70 Update zulipchat.com links to zulip.com.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-11 21:06:58 -07:00
Lunatic Luna
3b1ef57694 bots: Support adding reactions to message for a bot.
It adds a react() function that allows a bot to react to a message in lib.py.
It adds an example of the use of react() function and its test.

The changes are in the following files:
  - lib.py
  - helloworld.py
  - tests/test_lib.py
  - test_lib.py
2020-05-08 10:46:56 -04:00
pemontto
a9268a1947 jira: Add JQL search command. 2020-04-28 12:46:40 -07:00
pemontto
a46dae37f5 jira: Add search command. 2020-04-28 12:46:40 -07:00
pemontto
b0c2b1b9c8 jira: Use display_url in output. 2020-04-28 12:45:36 -07:00
pemontto
3ca336246d jira: Allow overriding https. 2020-04-28 12:45:36 -07:00
pemontto
ae8a3516fb jira: Fix deprecation warning. 2020-04-28 12:45:36 -07:00
Anders Kaseorg
17cf26aa1f cleanup: Move line breaks before binary operators.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
6f40bcf745 cleanup: Fix whitespace around parameter equals.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
562fe610b7 cleanup: Fix whitespace around function annotation arrows.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
bd9bb0a4e8 cleanup: Fix indentation.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
07c64673f7 test_jira: Remove redefined test_edit method.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
a01e5e37f4 cleanup: Remove more unused variables.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
54b2578204 cleanup: Remove unused variables.
Generated by autoflake.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
f5d96dbcce cleanup: Remove duplicate imports.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
adde59e5c3 cleanup: Remove more unused imports.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
2f6623bbc4 cleanup: Remove unused imports.
Generated by autoflake.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
64d2f5ac32 test_connect_four: Expand star import.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
7c5f73dce9 salesforce: Add missing typing import. 2020-04-18 20:31:14 -07:00
Anders Kaseorg
d68437d5f5 Rewrite some strings using raw string syntax.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
Anders Kaseorg
e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
fishfred
0a0f9e9d21 bots: Fix tictactoe, connect_four emoji 2020-03-30 12:02:32 -04:00
neiljp (Neil Pilgrim)
357a5e06f3 mypy: Clarify type hints in zulip_bots/. 2020-03-24 21:25:45 -07:00
orientor
62555f97a0 Bots: Update Owlbot from v1 to v2. 2020-03-04 13:12:29 -08:00
Aman
264632230b lint: Remove trailing whitespace from json files. 2020-01-14 16:00:24 -08:00
Alexandra Ciobica
ca1b415a1b docs: Change integration docs so that all the pages from portico/integrations look the same. 2019-07-13 11:08:22 -07:00
Sheehan Khan
0e8347d440 bot tests: Improve test coverage for TicTacToeModel.
This commit improves test coverage of from 41.66% to 50%.

This commit is related to #417
2019-04-21 20:09:44 -02:30
Rohitt Vashishtha
be4f9a0c32 bots: Use bold formatting judiciously in trivia bot. 2019-01-30 08:38:10 -08:00
Rohitt Vashishtha
49d3f4cfbb bots: Make trivia bot responses mention currently interacting user. 2019-01-29 11:39:33 -08:00
Marco Burstein
d176fbe324 bots: Fix a Chessbot dependency error.
Specify a version for Chessbot so that it will continue to function
properly if the library is updated. Also, update `test-bots` to remove
a temporary fix for Chessbot.
2018-12-09 18:57:10 -08:00
Steve Howell
3d68e394dc bots: Raise KeyError inside storage.get().
Our bots rely on get() raising `KeyError` if
a key does not exist.

This was a regression in this commit:

d7d2f6bbd6
2018-12-09 11:16:30 -08:00
Steve Howell
4d03ab0558 Add incident bot.
This is a pretty alpha proof-of-concept.
2018-10-11 10:36:00 -04:00
neiljp (Neil Pilgrim)
617e16cebb bridges: Bring inter-realm (zulip) bridge into zulip/ & rename others. 2018-08-08 17:26:15 -07:00
John Pellman
91b570aca8 jira: Fix JSON post requests for create and edit commands. 2018-07-23 08:06:00 -07:00
Jordan Troutman
ab97b37ce1 merels tests: Adapt merels tests to game_handler.
The merels bot was ported to game_handler, but the tests
were not updated.  Most changes are minimal, but require
changing how to start a game.  It is unclear if the
merels start game was properly updated.

 Author:    Jordan Troutman <jttroutman99@gmail.com>
2018-07-09 11:03:15 -04:00
novokrest
f4bea72557 youtube: Add test for unknown error during initialize. 2018-07-01 08:03:56 -04:00
novokrest
5eef519b3b giphy: Add test for connection error during config validation. 2018-07-01 08:02:59 -04:00
novokrest
7fc1ff5e0e bots: Add bot for uploading files to Zulip server.
Add file_uploader bot as an example of using
ExternalBotHandler's methods for uploading files
to Zulip server.
2018-07-01 07:57:45 -04:00
novokrest
935701aea2 flock: Add test for connection error during message sending. 2018-07-01 07:55:36 -04:00
novokrest
0fec20239d flock: Fix error message for invalid user. 2018-07-01 07:55:36 -04:00
novokrest
7b3c083ab5 flock: Refactor test_no_recipient_found test to increase coverage. 2018-07-01 07:55:36 -04:00
novokrest
80adce3cee flock: Change name of var res to users in get_recipient_id method. 2018-07-01 07:55:36 -04:00
novokrest
7fe37dbfe8 flock: Move calling requests to flock's urls to separate method.
Introduce `make_flock_request()` method to make requests to flock's URLs.
2018-07-01 07:55:36 -04:00
novokrest
efdc96929f flock: Change returned type of get_recipient_id to tuple (userId, error). 2018-07-01 07:55:36 -04:00
novokrest
c2a3d4c517 flock: Rename method find_recipient to find_recipient_id. 2018-07-01 07:55:36 -04:00
novokrest
0a7a06f028 flock: Rename local var to to recipient_name in find_recipient method. 2018-07-01 07:55:36 -04:00
novokrest
d24e4fc5c8 flock: Pass recipient's name as first argument in get_recipient_id method. 2018-07-01 07:55:36 -04:00
novokrest
5c46a4e68e flock: Rename local var to to recipient_id in get_flock_response(). 2018-07-01 07:55:36 -04:00
novokrest
a17bd77b71 jira: Build request's data as dictionary to create/edit issues.
Build data in `make_create_json` and `make_edit_json` methods
as dictionary to send as JSON payload.
2018-07-01 07:54:28 -04:00
novokrest
24a157cd37 jira: Refactor old tests to use mock_http_conversation. 2018-07-01 07:54:28 -04:00