Commit graph

998 commits

Author SHA1 Message Date
Krzysztof Krzysztof b540c09768 bots: Correct weird behavior of followup bot for empty messages.
Before it sends an empty message to followup stream, now it sends a
help message back to the user/stream where it was mentioned.
2017-05-24 11:58:12 -07:00
derAnfaenger 854416b725 bots: Add incrementor bot.
This bot provides a sample implementation
for updating existing messages sent by the
bot.
2017-05-24 11:01:47 -07:00
derAnfaenger 6f88c2c9a2 bots: Dedup rate limiting error code. 2017-05-24 11:01:47 -07:00
derAnfaenger 45e0f77298 bots: Allow bots to update messages. 2017-05-24 11:01:46 -07:00
Tim Abbott bfb4ec78cc contrib_bots: Fix lint errors in virtual_fs.py. 2017-05-23 21:35:09 -07:00
neiljp 194ba1367b contrib_bots: Clean up and document virtual_fs bot. 2017-05-23 21:04:34 -07:00
Abhijeet Kaur 63efed5c73 Refactor: Make StateHandler() function independent.
This refactor makes the nested class 'StateHandler' in the
file /contrib_bots/bot_lib.py independent class. It previously
was nested in 'run_message_handler_for_bot' function.

This is done to write a cleaner test file for contrib_bots using
mock library.
2017-05-23 20:42:09 -07:00
Theodore Chen a8b825388d bots: Fix googlesearch bot exceptions and add readme. 2017-05-23 20:18:24 -07:00
derAnfaenger bb70c5beed bots: Fix converter bot.
The converter bot depended on past.utils.old_div,
which is not supported anymore. Updating the code
to use the // operator, which provides the same
functionality.
2017-05-23 20:13:29 -07:00
neiljp adb5f645bc contrib_bots: Update xkcd bot to use send_reply.
This enables private message usage.
2017-05-23 18:43:43 -07:00
neiljp 915d98aa68 contrib_bots: Remove triage_message() from help bot.
This completes removing triage_message from the tree.
2017-05-23 18:30:39 -07:00
neiljp ec0de2a7ff contrib_bots: Switch encrypt bot to use send_reply. 2017-05-23 17:32:51 -07:00
neiljp 9c637db2ec bots: Switch define bot to use send_reply. 2017-05-23 17:02:03 -07:00
neiljp 0606d7acad bots: Fix help bot replies in private chat, including 3+ users.
Also deduplicates the code.
2017-05-23 14:38:49 -07:00
Theodore Chen 9604ffca38 bots: Add helloworld example bot. 2017-05-23 13:15:21 -07:00
neiljp bd37161ece Factor out send_reply functionality into bot_lib 2017-05-23 12:40:08 -07:00
umkay 5252626095 mypy: Change type annotation to Set[bytes].
also fix unicode
2017-05-23 10:42:44 -07:00
neiljp ad25f27853 Update Wikipedia bot to reply to multiple user private chats. 2017-05-23 08:17:35 -07:00
Tim Abbott 657478cfc5 bot_lib: Fix indentation. 2017-05-23 08:17:22 -07:00
derAnfaenger 81cd41da17 bots: Strip leading whitespaces from bot queries. 2017-05-22 19:13:42 -07:00
derAnfaenger 374c80d86a bots: Clarify message handling for @-mentions. 2017-05-22 19:13:42 -07:00
derAnfaenger 60d4c343d7 bots: Allow empty bot queries.
This commit allows bots to be adressed with empty queries,
that is, by just @-mentioning them. @-mentioning is now the
only way to adress a bot.
2017-05-22 19:13:42 -07:00
Eeshan Garg 2d785ea3d1 api: Use the console_scripts entry point to point to zulip-send.
Instead of using the `scripts` keyword, we now use the
`console_scripts` entry point to point to the zulip-send script
to be installed. This is what the Python Packaging User Guide
recommends for better cross-platform compatibility.
2017-05-22 18:08:18 -07:00
Elliott Jin 9b20750456 bots: Allow symlinks in bot paths provided to run.py.
run.py requires that the location of the provided bot matches the location
of run.py.  However, run.py previously failed in the case where the location
included a symlink.
2017-05-22 16:52:29 -07:00
Jordan Gedney f124531a88 mypy: Add type: ignores for optparse.OptionGroup.
Typeshed has already fixed this upstream (Description is optional)
2017-05-22 14:40:48 -07:00
Jordan Gedney 00dbd26500 mypy: PySvn Client.Log returns a dictionary mapping to many different types. 2017-05-22 14:39:26 -07:00
umkay b404fb3672 mypy: Change type annotation from union to explicit set 2017-05-22 13:47:55 -07:00
Tim Abbott 53af52fd69 zephyr_mirror: Include URL for mirroring server. 2017-05-10 11:54:09 -07:00
Tim Abbott b426870a30 zephyr_mirror: Fix buggy zephyr_mirror_backend import. 2017-05-10 11:52:34 -07:00
Tim Abbott 576c6f51f0 zmirror-renew-kerberos: Clean up hardcoding of user ID. 2017-05-10 11:52:34 -07:00
Tim Abbott fed5180d19 zephyr_mirror: Avoid transmitting null characters to server. 2017-05-10 11:52:34 -07:00
Tim Abbott 951c5588b6 zephyr_mirror: Add support for discuss-format messages. 2017-05-10 11:52:34 -07:00
Tomasz Kolek 7c81302fcd Add Slack importer bot. 2017-05-09 10:48:08 -07:00
Aditya Bansal 950101651d pep8: Add compliance with rule E261 to bots/define/define.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal 65a6460d6e pep8: Add compliance with rule E261 to zephyr_mirror_backend.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal ab3cbd313b pep8: Add compliance with rule E261 to summarize_stream.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal fbcfa6239a pep8: Add compliance with rule E261 to jabber_mirror_backend.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal c7fbe91ab6 pep8: Add compliance with rule E261 to irc-mirror.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal 5605dfb6b1 pep8: Add compliance with rule E261 to api/zulip/__init__.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal d8de4cc948 pep8: Add compliance with rule E261 to api/setup.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal 2c63d7573d pep8: Add compliance with rule E261 to zulip_openshift_config.py. 2017-05-07 23:21:50 -07:00
Eeshan Garg dc3f0f35ad Document how to set up an Asana integration via Zapier.
Fixes #3948.
2017-03-21 19:56:47 -07:00
Tim Abbott 3cf8d11156 zephyr_mirror: Simplify process for finding backend script. 2017-03-20 21:52:04 -07:00
Tim Abbott beb2a6570f sync_public_streams: Use option group for arguments. 2017-03-20 21:52:04 -07:00
Tim Abbott 362d7424ed check-mirror: Remove unnecessary zulip_user variable. 2017-03-20 21:52:04 -07:00
Tim Abbott fa6a8488dd check-mirroring: Remove api.zulip.com hardcoding. 2017-03-20 21:52:04 -07:00
Jacob Hurwitz baefa61edf [zephyr_mirror] add support for zcrypt'ed classes with colons
The regex used for parsing .crypt-table didn't allow colons in class
names. This commit changes the [^:] token with \S, meaning that class
names can now contain colons but can no longer contain whitespace.

I think this should be fine, since zcrypt is only used for MIT zephyr,
where (by convention) class names do not contain whitespace.

Additionally, it should not be possible for us to accidentally consume a
field-separating colon as part of the class capture group because the
regex enforces that all field-separating colons are followed by one or
more whitespace characters, whereas the class name cannot contain
whitespace.
2017-03-19 22:30:21 -07:00
Tim Abbott fa67e87d3d mypy: Fix some new errors flagged by latest mypy master.
Mostly list -> List bugs in annotations.
2017-03-19 21:03:45 -07:00
Yago González 1894a134f8 bots: Move Google search bot and fix bugs.
Now this bot follows our latest structure for contrib_bots.

Switched the dependencies instructions, to install "google" rather than
"google-api-python-client".

Added all the search terms to the query (not only the first one).
2017-03-17 13:03:06 -07:00
Tim Abbott 31b88c9225 lint: Fix PEP8 lint error in googlesearch.py. 2017-03-17 12:15:43 -07:00