Commit Graph

23625 Commits

Author SHA1 Message Date
rht 1324d9f000 mypy: Use Python 3 type syntax in zerver/views. 2017-12-30 07:34:05 -05:00
rht 2e8adbde12 mypy: Use Python 3 type syntax in zerver/lib/actions.py. 2017-12-30 07:33:07 -05:00
Eeshan Garg e769a7eed2 api docs: Document the get-streams endpoint.
This commit documents the get-streams endpoint, which can be
by making a GET request to /api/v1/streams.

Note that in the code examples, JavaScript is missing an example
for how to pass in the `include_` query parameters. That is
because zulip-js's client.streams.retrieve function doesn't take
any arguments and zulip-js does not export any function equivalent
to client.call_endpoint in python-zulip-api/zulip.
2017-12-29 17:03:36 -05:00
Eeshan Garg 3003d3d927 api examples: Change required JS module from `zulip` to `zulip-js`.
The JS module we ask our users to install in the installation
instructions is zulip-js, not zulip. These examples would fail
with the latter. This commit updates the examples to use the
name zulip-js.
2017-12-29 17:03:36 -05:00
Eeshan Garg 89f622937d api docs: Generate Arguments table from JSON.
This commit does the following:
* Move the Arguments table data from stream-message.md and
  private-message.md to a JSON file.
* Add a Markdown extension that allows one to include and render
  a table from a JSON file like so:
    {generate_arguments_table|arguments.json|private-stream.md}
* Use Bootstrap's .table class to format the table instead of
  relying on custom CSS.
2017-12-29 17:03:36 -05:00
Eeshan Garg 229cdfce90 markdown: Add a macro for invalid API key JSON response.
The JSON response for when an invalid API key is used to initiate
an API call seems to be identical in every case, so this macro
can be reused all the time.
2017-12-29 17:03:36 -05:00
Eeshan Garg 3a90a6be5e markdown: Add macro for successful send message JSON response.
The JSON response for when an API call to send a message is
successful is the same for both private and stream messages, so
these macros may be used again.
2017-12-29 17:03:36 -05:00
Eeshan Garg b093a861e0 api/private-message: Document arguments and examples responses.
This commit adds the following:

* A table specifying the arguments that are required for this API
  call.
* Examples of JSON responses.

This will help us in obsoleting api_endpoints.html.
2017-12-29 17:03:36 -05:00
Eeshan Garg cdcaf1374e api/stream-message: Document arguments and examples responses.
This commit adds the following:

* A table specifying the arguments that are required for this API
  call.
* Examples of JSON responses.

This will help us in obsoleting api_endpoints.html.
2017-12-29 17:03:36 -05:00
Eeshan Garg 94bc9d52d1 api docs: Split usage.md into two separate docs.
This commit splits usage.md into two separate docs,
stream-message.md and private-message.md. The arguments and return
values for sending a stream message are somewhat different from
those of sending a private message, so it made sense to split the
two up for clarity.
2017-12-29 17:03:36 -05:00
YJDave 29905ad5d6 create stream: Before sending notificaion, check if NOTIFICATION_BOT exists.
There might be case that NOTIFICATION_BOT is none, so before sending stream
announce notification, check first if settings.NOTIFICATION_BOT is not none.
2017-12-29 08:59:55 -05:00
akashnimare db7943478e api: Align code blocks properly in /api page.
Fixes #7395.
2017-12-29 08:45:37 -05:00
MadElf1337 39fc26deff integrations: Add webhook payloads for Runscope. 2017-12-29 07:27:20 -05:00
Steve Howell 4a27f4199d Try to avoid codecov spam.
I am increasing the threshold even more for when
codecov complains.  Since the tool reports so many
false negatives, we should probably change our philosophy
on code coverage so that this tool only reports
catastrophic commits (like .e.g. a commit that prevents
running a whole test suite) and let our more specific
tools continue to catch things like regressions of files
from 100% coverage.
2017-12-29 07:23:26 -05:00
akashnimare ef51a39552 markdown: Update regex for strikethrough.
This uses the correct regex for strikethrough. Also, added
a test to make sure that strikethrough works when it contains
link with whitespace.

Fixes #7596.
2017-12-28 15:59:04 -05:00
YJDave dd406e87e9 settings: Check if xhr response text include ':' or not.
We join extra text message for notification and xhr response text by ':'.
Before joining, check if xhr response text already include ':', to
prevent notification with more than one ':'.
2017-12-28 15:54:57 -05:00
YJDave c06028159e org setting: Clean code of realm domain modal.
Remove extra lines for reporting alert messages on modal
and add predefined ui_report functions instead.
2017-12-28 15:54:57 -05:00
MadElf1337 de62e11c23 integrations: Add webhook payloads for StatusPage.io. 2017-12-28 15:53:06 -05:00
cPhost 470e57db49 node tests: Enforce 100% coverage for stream_data.js. 2017-12-28 09:39:45 -05:00
cPhost 154436140b node tests: Cover stream_data.delete_sub. 2017-12-28 09:39:45 -05:00
Steve Howell 80477da481 quick fix: Stop tracebacks with missedmessage_hook.
A `None` value is not properly handled in this function, which
indicates some lack of testing or a recent regression we don't
understand.  We were getting lots of tracebacks from this line
of code on our test server:

    mentioned = 'mentioned' in flags and 'read' not in flags
2017-12-28 08:10:56 -05:00
Rishi Gupta ad9f0dea36 documentation: Explain major and minor provision_version. 2017-12-28 08:04:16 -05:00
Kiy4h 2e35b7fd60 mypy: Use Python 3 type syntax in zerver/webhooks/taiga/view.py. 2017-12-28 07:26:44 -05:00
Kiy4h 93cc19e3f8 mypy: Use Python 3 type syntax in zerver/webhooks/helloworld/view.py. 2017-12-28 07:26:44 -05:00
Kiy4h 3b7fbc1a1d mypy: Use Python 3 type syntax in zerver/webhooks/gosquared/view.py. 2017-12-28 07:26:44 -05:00
Kiy4h 6fa51be822 mypy: Use Python 3 type syntax in zerver/views/push_notifications.py. 2017-12-28 07:26:44 -05:00
Kiy4h 64413e3b91 mypy: Use Python 3 type syntax in zerver/views/email_mirror.py. 2017-12-28 07:26:44 -05:00
Kiy4h 238cd2b132 mypy: Use Python 3 type syntax in zerver/views/alert_words.py. 2017-12-28 07:26:44 -05:00
Kiy4h 78e71faefe mypy: Use Python 3 type syntax in zerver/lib/test_fixtures.py. 2017-12-28 07:26:44 -05:00
Steve Howell aae69702fe casper: Try to fix clicking flakes for message editing.
The new `common.then_click` should prevent some races and remove
some duplicate code.
2017-12-27 18:33:32 -05:00
Steve Howell 9391f7aa98 quick fix: Turn off git lint for Travis builds.
We may be having problems with git lint, so this is a quick
fix to hopefully get builds working again.
2017-12-27 18:20:18 -05:00
Balaji2198 de27142e16 stream settings: Fix link to docs about public/private streams. 2017-12-27 15:04:34 -08:00
Steve Howell 6d59dbca8d casper: Add more flake protection for message editing.
(This is a continuation of the prior commit's technique.)
2017-12-27 17:25:14 -05:00
Steve Howell 27f7bdf8b1 casper: Attempt to fix flakes with message edit settings.
This introduces the helpers submit_checked() and submit_unchecked()
to wait to submit forms till casper sees the checkbox being clicked.
2017-12-27 17:12:52 -05:00
Cynthia Lin 5df9011ae5 user docs: Apply highlights to documentation indexes. 2017-12-27 15:15:05 -05:00
Cynthia Lin fa92a35f17 user docs: Highlight currently selected user docs article.
Fixes #7053.
2017-12-27 15:15:05 -05:00
Cynthia Lin 1dcd311ce8 user docs: Fix miscolored hamburger icon on mobile view. 2017-12-27 15:15:05 -05:00
Rhea Parekh ed4054d110 Import script: Check and add system bots after every import.
This checks for the existing system bots and adds them if they
aren't included in the import.
2017-12-27 07:52:45 -05:00
Rhea Parekh 01fa8416b1 Slack importer: Updating the documentation to the new method.
The already existing import-users-and-channels-from-slack.md file is
updated here to follow the new method.
2017-12-27 07:50:53 -05:00
Rhea Parekh 6b32519a71 Slack importer: Add Travis tests. 2017-12-27 07:50:53 -05:00
Rhea Parekh 62aec0688f Slack importer: Add slack to zulip data conversion script as a manage.py command. 2017-12-27 07:50:53 -05:00
Rhea Parekh cd332a7f59 Slack importer: Append ids to the existing ids in the database.
For import with the condition `--import-into-nonempty`, the ids
of the mapped data will be appended to the existing ids in the
database.
2017-12-27 07:50:53 -05:00
Rhea Parekh 5b37c5562b Slack importer: Add the slack to zulip data conversion files. 2017-12-27 07:50:53 -05:00
Rhea Parekh 3d4ee3b862 zerver/tests/test_email_mirror: Sweep force_str. 2017-12-26 09:09:31 -05:00
Rhea Parekh 25e5969add zerver/lib/mobile_auth_otp: Sweep force_str. 2017-12-26 09:09:31 -05:00
Rhea Parekh cc872ad976 zerver/lib/upload.py: Sweep force_bytes from ensure_medium_avatar_image. 2017-12-26 09:09:31 -05:00
Rhea Parekh 092472f42d tests: Add test coverage for uploading avatars to S3UploadBackend.
Add test coverage for the function upload_avatar_image and
ensure_medium_avatar_image in S3UploadBackend.
2017-12-26 09:09:31 -05:00
Rhea Parekh bebd8df728 zerver/webhooks/github/view: Sweep force_str. 2017-12-26 09:09:31 -05:00
Rhea Parekh 99cb001345 zerver/webhooks/beanstalk/view.py: Sweep force_bytes and force_str. 2017-12-26 09:09:31 -05:00
Rhea Parekh b792a90842 Remove unused imports in the codebase. 2017-12-26 09:09:31 -05:00