Commit graph

1130 commits

Author SHA1 Message Date
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
royabouhamad 054db19ad9 interactive bots: create a google bot. 2017-03-17 11:54:21 -07:00
Abhijeet Kaur 1b31a16d13 contrib bots: Better error handling response in thesaurus. 2017-03-14 13:29:19 -07:00
Abhijeet Kaur 050162592a contrib bots: john bot can reply back in the same chat.
No need to create an extra "VirtualHelp" stream.
2017-03-14 13:29:19 -07:00
Abhijeet Kaur 92d2981726 contrib bots: Edit code for uniformity.
Add one function (get_bot_botname_response()) that generates response
from the given input and replies back to the handle_message with the final
content of response to be sent. Also add code to bots(except followup) to
reply to private messages along with stream messages.
2017-03-14 13:29:19 -07:00
Abhijeet Kaur d715787170 contrib bots: Rename bots to follow a consistent pattern.
Files renamed with few changes to accomodate the change in
path name of files. Fix few "at-mention bot" errors in docs.
2017-03-14 13:29:19 -07:00
Abhijeet Kaur 6dda0eb506 contrib bots: Rename bots to follow a consistent pattern.
Files renamed without any changes.
2017-03-14 13:29:19 -07:00
Umair Khan e749ff8c92 capitalization: Fix API Key in documentation. 2017-03-08 23:36:36 -08:00
derAnfaenger 87d641d6c2 Replace native datetimes in the Codebase integration.
Update all utcnow() and now() calls, as well as other native dates to
specify the UTC timezone.
Fixes #3809.
2017-03-08 15:32:06 -08:00
Abhijeet Kaur 7c3a228450 doc updates: Remove triage_message function from contrib-bots. 2017-03-07 22:23:11 -08:00
sinwar 04580dbb97 python: Fix remaining bare excepts in codebase.
Fixes #2862.
2017-03-05 16:17:04 -08:00
Raghav Jajodia 58f5e729b6 mypy: Added Dict, List and Set imports.
Fixed mypy errors associated with the upgrade.
2017-03-04 14:33:44 -08:00
Rishi Gupta 94871fea76 Fix several new errors caught by mypy 0.501.
Clear out a bunch of easy to review errors, so we can focus on the more
complicated ones.
2017-03-03 14:12:52 -08:00
Rishi Gupta 6c47fa77b6 Use time.time() instead of datetime.now() to measure elapsed time.
Both because it is more idiomatic and because we will soon start enforcing
that all datetimes in Zulip are timezone aware.
2017-03-01 22:54:28 -08:00
Elliott Jin b2ac1bca29 Clean up timestamp formatting in Google Calendar bot. 2017-02-28 09:29:07 -08:00
Elliott Jin a74490bf1c Google Calendar bot: Populate events array directly. 2017-02-26 18:05:46 -08:00
Elliott Jin 478785b415 Google Calendar bot: Include time zone offsets in timestamps.
Fixes: #3769
2017-02-26 18:05:46 -08:00
Tim Abbott 060b680674 mypy: Fix inconsistencies in use of *args/**kwargs. 2017-02-18 18:39:44 -08:00
Tim Abbott ca5fa6c9de mypy: Remove now-unused type: ignores. 2017-02-18 17:01:01 -08:00