Commit graph

918 commits

Author SHA1 Message Date
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
Abhijeet Kaur 9a8dc7c622 Remove triage_message() function from all the contrib-bots.
To make all bots consistent add shared function in bot_lib.py
to check if this bot is called. All bots respond to at-mention of
the bot instead of their specific names.
2017-02-17 06:51:48 -08:00
Tim Abbott a87ae4b1c4 api: Add bindings for new get_presence endpoint. 2017-02-10 23:52:56 -08:00
Abhijeet Kaur 9a8dc2661a bug fix: Fix errors in "john" bot in contrib_bots.
Fix outdated code in "john.py" to use "OutputAdapter" module
in Chatterbot. Typecast Chatterbot response to string.
2017-02-10 06:44:03 -08:00
Abhijeet Kaur 0419848d3c contrib_bots: Restructure bots to follow a consistent structure.
Now all the bots that are stored in contrib_bots are in the
same file/directory format.
The format is specified here #3427. Add tests.py file for encrypt_bot as well.
Fixes #3427.
2017-02-10 06:44:03 -08:00
Abhijeet Kaur 2282000d78 bug fix: Fix wikipedia bot in case no results are found.
Incorrect Index access in wikipedia.py resulted in IndexError and
wikipedia bot to crash for few queries. This causes the bug to be fixed.
Replaced url to avoid 2 redirects and enhance performance.
Fixes: #3508.
2017-02-09 12:20:51 -08:00
Eklavya Sharma 1ee3e476f3 Change True to 'True' in requests.get params.
According to stubs from mypy 0.4.7 onwards, `requests.get` takes
a parameter `params` of type `Dict[AnyStr, AnyStr]` where `AnyStr`
can be either bytes or text.  Actually, requests can accept values
of other types in dicts too but it casts them to a string type.

So to avoid type checking error messages, change `True` to `'True'`.
2017-02-07 12:55:25 -08:00
Rohitt Vashishtha 863df67150 api: Add support for Environment Variables.
This adds support for controlling the basic configuration (user, API
key, etc.) of the Zulip API bindings via environment variables.

Fixes #3364.

Tweaked by tabbott to update variable names and document in README.md.
2017-02-06 22:56:59 -08:00
sinwar 46e7e05516 bots: Use requests instead of unirest for Yoda bot.
Fixes #3500.
2017-02-06 22:07:38 -08:00
Tim Abbott 4c482bfb66 Replace references to zulip.com/dist with zulip.org/dist.
Now that zulip.org has all the files to distribute, there's no reason
to still point to the soon-to-be-decommissioned zulip.com/dist.
2017-01-28 17:56:25 -08:00
Yago González 3fcb4d33f1 contrib_bots: Fix typos and repetitions in the readme. 2017-01-27 16:39:19 -08:00
Steve Howell 39becef8c0 Fix update_message() in our API.
This was regressed in b3df1ddeb1bbf67695a673278ae3c4a3e7c9ae99.
2017-01-25 16:33:19 -08:00
Tim Abbott 722fc56534 lint: Clean up E126 PEP-8 rule. 2017-01-23 22:06:13 -08:00