Commit Graph

23553 Commits

Author SHA1 Message Date
Marco Burstein 6f8792729d manage.py: Move the maximum digits calculation to outside of a loop. 2018-01-02 17:21:28 -05:00
Marco Burstein ff5a73e027 manage.py: Make it easy to create lots of streams with `populate_db`.
Fix #7968.
2018-01-02 16:48:03 -05:00
Eeshan Garg 18c3bec667 webhooks/gci: Support "unassign" event type.
This commit adds support for the "unassign" event type, the
payloads for which are generated when a mentor unassigns a student
from a task.
2018-01-02 16:42:00 -05:00
Eeshan Garg 2c7f4d2187 webhooks/gci: Support "extend" event type.
This commit adds support for events of type "extend", the payloads
for which are generated when a mentor extends the deadline for a
task.
2018-01-02 16:42:00 -05:00
Steve Howell ec2015ee8c Extract settings_display.report_emojiset_change().
This mostly moves code from server_events_dispatch, but
it also de-duplicates the logic in emoji_success(), and
it does early-return for the "text" case to keep the
function a bit flatter.
2018-01-02 15:13:50 -05:00
Aastha Gupta daf86eb664 settings: Add "text" option to emoji_set model.
We no longer have a special UI setting and model
field ("emoji_alt_code") for saying users want text-only
emojis.  We now instead make "text" be a fifth choice
for "emojiset".

Fixes #7406
2018-01-02 14:55:01 -05:00
YJDave 5ff84e97b5 markdown: Add markdown shortcuts.
Markdown shorcuts:
ctrl/cmd+b ->insert bold text
ctrl/cmd+i ->insert italic text
ctrl/cmd+l ->insert link

Fixes #5978
2018-01-02 13:48:50 -05:00
Vishnu Ks 277d463d23 messages: Add option to limit users message history. 2018-01-02 13:45:01 -05:00
MadElf1337 e7f1a9ee34 inetgrations: Add webhook payloads for Honeybadger. 2018-01-02 11:45:33 -05:00
YJDave fa44d2ea69 settings: Remove autoscroll_forever setting.
Fixes #6845
2018-01-02 10:35:49 -05:00
Umair Khan c2248a81dc Enable test-run-dev. 2018-01-01 09:42:11 -05:00
Umair Khan 9bbce65274 test-run-dev: Redirect stderr to STDOUT.
This redirects the STDERR of run-dev.py command to STDOUT. This is
how you are supposed to redirect according to the docs.
2018-01-01 09:42:11 -05:00
Umair Khan 4c5d361990 test-run-dev: Remove close_and_get_content.
After the new implementation of start_server, this function is not
needed anymore.
2018-01-01 09:42:11 -05:00
Umair Khan 45b004818b test-run-dev: Fix start_server implementation.
Previously, there were following problems with the implmentation:
 * Same file handle was being used to read and write. We used to do
   `seek(0)` and then `read()`. This had a chance to overwrite file
   data. Now we use different file handles to read and write data.
 * We were using text streams. Text streams cannot be used with
   `bufferring=0`. Now we use binary streams without buffering so that
   data is available for reading without any delay.
2018-01-01 09:42:11 -05:00
Umair Khan cd849bc3f1 test-run-dev: Disable Nagios check.
We have moved API to a separate repo. Nagios related code still assumes
that the api folder exists in the Zulip repo.
2018-01-01 09:42:11 -05:00
XavierCooney 5409a98039 docs: Fix typo in multiple-organizations.md. 2017-12-31 09:11:30 -05:00
Jerry Zhang 535e6bd218 user docs: Add user guide for configure authentication methods.
Fixes #3357.
2017-12-31 08:09:47 -05:00
Cynthia Lin c31e148ea8 user docs: Add links back to homepage to the bottom of the sidebars. 2017-12-31 08:08:25 -05:00
Cynthia Lin 20a745390b user docs: Allow redirection of external URLs in documentation sidebars.
Fixes #7916.
2017-12-31 08:08:25 -05:00
Utkarsh Patil 50be484964 onboarding: Fix error-password overlap bug
Apply appropriate spacing between password field and error message.

Fixes: #7796.
2017-12-30 11:05:39 -05:00
Eeshan Garg 80405747ce test_docs: Test new API docs (templates/zerver/api/*). 2017-12-30 11:03:23 -05:00
Eeshan Garg b73c60a135 api docs: Document the GET /api/v1/users endpoint. 2017-12-30 11:03:23 -05:00
Eeshan Garg b31bdf23ca api docs: Document the POST /api/v1/messages/render endpoint.
Note that currently, there is no way to interface with this
endpoint using zulip-js.
2017-12-30 11:03:23 -05:00
Eeshan Garg 0458faf2f9 api docs: Document the GET /users/me/subscriptions endpoint. 2017-12-30 11:03:23 -05:00
Eeshan Garg cf8a8c8811 api docs: Document the GET /api/v1/get_stream_id endpoint.
This commit documents the /api/v1/get_stream_id endpoint.

Note that there is currently no way to interface with this
endpoint with zulip-js.
2017-12-30 11:03:23 -05:00
Cynthia Lin 781e8b442f general UI: Add a description for the message view source icon. 2017-12-30 11:00:44 -05:00
Cynthia Lin e71970ca46 general UI: Add a description for the message edit icon.
Fixes #7745.
2017-12-30 11:00:44 -05:00
rht 185fd99816 mypy: Use Python 3 type syntax in several files. 2017-12-30 07:34:51 -05:00
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