Commit Graph

29 Commits

Author SHA1 Message Date
rht 185fd99816 mypy: Use Python 3 type syntax in several files. 2017-12-30 07:34:51 -05:00
Rhea Parekh bebd8df728 zerver/webhooks/github/view: Sweep force_str. 2017-12-26 09:09:31 -05:00
Tim Abbott 73a668e7ae python: Sort imports in webhooks. 2017-11-15 15:43:10 -08:00
rht 04eaec64f0 zerver/webhooks: Text-wrap long lines exceeding 110. 2017-11-07 17:24:09 -08:00
rht 969cc506d2 zerver/webhooks: Use python 3 syntax for typing.
Tweaked by tabbott to fix various line-wrapping issues.
2017-11-04 19:40:32 -07:00
Eeshan Garg aaaed74c3d webhooks: Import REQ, has_request_variables from zerver.lib.request.
We now import REQ and has_request_variables from zerver.lib.request,
which is where these methods are defined.

Fixes #7195.
2017-11-02 14:40:55 -07:00
Greg Price eb55a3a1ba template context: Give better names to the URLs for the API.
The "subdomain" label is redundant, to the extent it's even
accurate -- this is really just the URL we want to display,
which may or may not involve a subdomain.  Similarly "external".

The former `external_api_path_subdomain` was never a path -- it's a
host, followed by a path, which together form a scheme-relative URL.
I'm not quite convinced that value is actually the right thing in
2 of the 3 places we use it, but fixing that can start by giving an
accurate name to the thing we have.
2017-10-30 18:29:29 -07:00
Steve Howell 655f37a34b Rename subject_name in send_message_backend(). 2017-10-27 10:48:11 -07:00
Tim Abbott be619fe881 lint: Wrap many very long lines in the Python codebase.
This decreases the maximum line length in our Python codebase to 130.
2017-10-26 17:31:58 -07:00
rht 7115a29bee zerver/webhooks: Remove absolute_import. 2017-09-27 10:00:39 -07:00
Tim Abbott 7d08ff69f0 tests: Remove most references to get_api_key.
This test helper doesn't really have value.
2017-08-24 23:30:46 -07:00
Tim Abbott 69059dcac8 tests: Clean up subscribing from webhook tests. 2017-08-24 21:37:57 -07:00
Eeshan Garg c3c004743c github/doc.md: Use Integration.stream_name as default stream. 2017-06-13 15:30:35 -07:00
Eeshan Garg 0cfe089152 webhooks/github: Migrate docs to Markdown. 2017-06-05 11:22:06 -07:00
Yago González 55b4a3792d lint: Fix violation in the GitHub webhook view. 2017-05-24 22:09:14 -07:00
umkay c1a8fb615c mypy: Fix strict-optional errors in webhooks directory. 2017-05-24 18:57:06 -07:00
Eeshan Garg 7227f488c8 webhooks: Add support for a GitHub push event deleting a branch.
Fixes: #4742.
2017-05-16 00:11:20 -02:30
Eeshan Garg 597db11a98 webhooks: Rename webhook fixtures to only include event type.
All webhook fixtures have now been renamed from
<webhook_name>/fixtures/<webhook_name>_<event_type>.json to
<webhook_name>/fixtures/<event_type>.json.
2017-05-13 20:07:40 -02:30
Aditya Bansal 54989605e0 pep8: Add compliance with rule E261 to github/tests.py. 2017-05-07 23:21:50 -07:00
Eeshan Garg aa12002be7 webhooks: Move all fixtures to zerver/webhooks/<webhook_name>/fixtures.
All webhook fixtures in zerver/fixtures/<webhook_name> have now
been moved to dedicated webhook-specific directories under
zerver/webhooks/<webhook_name>/fixtures, where <webhook_name> is
the name of the webhook.
2017-04-28 11:07:03 -07:00
Eeshan Garg ffdd5d3588 webhooks: Don't display "Commits by" when committer is the only author.
For our Git integrations, we now only display the number of commits
pushed when the pusher also happens to be the only author of the
commits being pushed.

Part of #3968.
Follow-up to #4006.
2017-04-26 18:26:09 -02:30
Eeshan Garg b7ca533315 webhooks: Add a space between author and number of commits for Git messages.
For Git push messages, we now have a single space character between
the name of a commit's author and the number of commits by that
author, plus a period at the end.

Part of #3968.
Follow-up to #4006.
2017-04-26 18:26:09 -02:30
Eeshan Garg af69faafc9 webhooks: Use author's name to format Git push messages.
We now use the name of the author of a commit as opposed to the
committer to format Git messages with multiple committers.

Part of #3968.
Follow-up to #4006.
2017-04-26 18:26:09 -02:30
Siddharth Mahapatra e7455e276b git integrations: Expand details in commit push notifications.
We now show a few new things:
(1) The number of commits pushed.
(2) Who authored the commits (just counts, not which specific ones, for brevity).

Add tests for case of multiple committers.

Part of #3968.
2017-04-21 11:07:44 -07:00
wizsid11 19d1f4cab7 git integration: Change push commits message to show url at the end. 2017-03-16 11:06:03 -07:00
Raghav Jajodia a3a03bd6a5 mypy: Added Dict, List and Set imports.
Fixed mypy errors associated with the upgrade.
2017-03-04 14:33:44 -08:00
Rishi Gupta 2bbfdeeb7b Fix more errors caught by mypy 0.501.
Another set of relatively easy to review changes.
2017-03-03 14:15:38 -08:00
Tomasz Kolek 6e6cbeb89d Split webhooks doc and move to particular directories. 2017-01-26 11:56:45 -08:00
Tomasz Kolek 7de45951e2 Make webhooks as separate modules with view and tests.
Create python packege for every webhook with view.py and tests.py
2017-01-25 23:14:19 -08:00