Commit Graph

112 Commits

Author SHA1 Message Date
Aditya Bansal
3791638985 pep8: Add compliance with rule E261 to semaphore/tests.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal
21dd1384b4 pep8: Add compliance with rule E261 to pivotal/view.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal
43c978e0f4 pep8: Add compliance with rule E261 to pagerduty/view.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal
54989605e0 pep8: Add compliance with rule E261 to github/tests.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal
f3c1557529 pep8: Add compliance with rule E261 to beanstalk/view.py. 2017-05-07 23:21:50 -07:00
Aditya Bansal
6bc653959f Remove empty comment statement from taiga/view.py. 2017-05-07 23:21:50 -07:00
Eeshan Garg
e87e246fcb zerver/decorator: Set request.client in api_key_only_webhook_view.
Previously, api_key_only_webhook_view passed 3 positional arguments
(request, user_profile, and client) into a function. However, most
of our other auth decorators only pass 2 positional arguments. For
the sake of consistency, we now make api_key_only_webhook_view set
request.client and pass only request and user_profile as positional
arguments.
2017-05-01 23:44:07 -07:00
Eeshan Garg
8ef18463d6 github_webhook: Use author's full name if username is not available.
In cases where the webhook payload doesn't have the username for the
author of a particular commit (this can happen if the author doesn't
have a GitHub account or the author's email is not associated with
their GitHub account), we now use the author's full name to format
messages.
2017-04-29 14:57:57 -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
Eeshan Garg
46b6475066 webhooks/gitlab: Use branches.find to filter Git notifications. 2017-04-25 10:46:21 -07:00
Eeshan Garg
8900e99ae5 github_webhook: Use branches.find to filter Git notifications. 2017-04-25 10:46:21 -07:00
Cynthia Lin
ef2ff9f9a0 integrations: Remove deprecated Stash integration. 2017-04-24 22:35:23 -07:00
Eeshan Garg
ce0f1453b9 webhooks: Filter specific BitBucket Git branches.
This is the last of the Git integrations that didn't have this
feature.

Fixes #4327.
2017-04-22 11:29:53 -07:00
Eeshan Garg
55e1154871 webhooks/beanstalk: Filter specific Git branches. 2017-04-21 22:06:11 -02:30
Eeshan Garg
dded73ec6f webhooks: Stop overriding build_webhook_url for URL query parameters. 2017-04-21 22:06:11 -02:30
Eeshan Garg
e68b957f3d webhooks/gogs: Filter specific Gogs branches. 2017-04-21 22:06:11 -02:30
Tim Abbott
e7974b3b65 git: Fix nondeterministic ordering of commit authors.
This should fix the nondeterministic test failures introduced by
e7455e276b.
2017-04-21 11:45:30 -07:00
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
hackerkid
55c3d12078 Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
Tomasz Kolek
2a55eff44b integrations: Add test event handler to Solano. 2017-04-11 16:59:06 -07:00
Umair Khan
5a3f83bba8 integrations: Move Trello webhook docs to markdown. 2017-04-07 15:52:15 -07:00
Tomasz Kolek
4867e68461 integrations: Add setup webhook message for Crashlytics.
This makes it easier to debug the setup process.
2017-04-06 11:27:48 -07:00
Eeshan Garg
da599ad28c webhooks/gitlab: Add support for filtering GitLab branches. 2017-04-04 13:51:08 -07:00
Eeshan Garg
8933b5b31d github_webhook: Filter specific GitHub branches.
Fixes: #4000
2017-03-26 13:32:24 -07:00
Tim Abbott
22d284950d trello: Clean up the documentation. 2017-03-25 17:04:52 -07:00
wizsid11
95789eb879 Add Slack webhook.
Adds a new webhook integration for Slack to receive messages
from one's Slack team's public channels.
Contains negative tests for broken, missing or invalid data.

Allows two different option for integration:
1. Receive notification on a single stream with different topics
for each of Slack's public channels.
2. Receive notification on different streams for each of Slack's
public channels.

Steps to choose between the two options is described in the documentation.

Fixes #3569.
2017-03-23 23:32:38 -07:00
Tomasz Kolek
be0a2cb20b Add basecamp3 webhook integration.
Fixes: #3949.
2017-03-23 23:28:53 -07:00
Tomasz Kolek
09f5180da9 github_webhook: Return 200 OK if event is not supported.
Change raising exception when event is not supported to just logging it.
2017-03-23 23:26:55 -07:00
Tomasz Kolek
fcd091132d jira: Return 200 OK if event is not supported. 2017-03-23 23:26:55 -07:00
Akash Kothawale
9e45f32275 gogs: Add webhook integration.
- Add push, create and pull request event.
- Handle 'opened', 'closed' and 'merged' in 'pull request' event.
- Include tests for all the above events including 'push' with commits
  more than limits.
2017-03-17 12:22:06 -07:00
Akash Kothawale
edfb9c21bc github_webhook: Send test message sent by GitHub webhook integration.
Fixes #3994.
2017-03-17 11:47:04 -07:00
wizsid11
19d1f4cab7 git integration: Change push commits message to show url at the end. 2017-03-16 11:06:03 -07:00
Tim Abbott
1c5e9ae7f6 mypy: Fix unicode error in Jira webhook. 2017-03-15 22:01:04 -07:00
Tomasz Kolek
51b839ac11 jira integration: Add support for unicode chars.
Fixes: #3967
2017-03-15 16:26:57 -07:00
wizsid11
f066e3e8d6 git integrations: Change the limit of shown commits from 10 to 20. 2017-03-14 13:24:45 -07:00
Tim Abbott
ae12f3dfd0 github: Fix URL in GitHub webhook documentation. 2017-03-08 23:25:30 -08:00
Tomasz Kolek
114c80efae Add ignore pull requests mechanism in Travis integration.
Add ignore_pull_requests param to url, with a default of true.

Fixes: #3912.
2017-03-08 21:51:04 -08:00
Tomasz Kolek
15485ec972 Refactor travis integration. 2017-03-08 21:49:32 -08:00
Feorlen
e0acdfde0d Add a Splunk webhook integration.
Add a webhook to create messages from Splunk search alerts. The search
alert JSON includes the first search result and a link to view the full
results. The following fields are used:

* search_name - the name of the saved search
* results_link - URL of the full search results
* host - the host the search result came from
* source - the source file on that host
* _raw - the raw text of the logged event.

The Zulip message contains:
* search name
* host
* source
* raw

The destination stream and message topic are configurable: the default
stream is "splunk" and the default topic "Splunk Alert". If the topic is
not provided in the URL, the search name is used instead (truncated if too
long. If a needed field is missing, a default value is used instead.

Example: "Missing source"

It is possible to configure a Splunk search to not include some values,
so I've provided defaults rather than return an error for missing data.
In practice, these fields are unlikely to be deliberately suppressed.

Note: alerts are only available for Splunk servers using a valid trial,
developer, or paid license.

I've added tests for the normal case of one search result, the topic from
the search name, and for a search missing one of the fields used. Tested
using Splunk Enterprise 6.5.1.

Fixes #3477
2017-03-07 21:48:26 -08:00
sinwar
6f0564e9f4 python: Fix remaining bare excepts in codebase.
Fixes #2862.
2017-03-05 16:17:04 -08: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
a1813e004e Remove local datetimes from webhook messages.
"Local" datetimes are local to the server (or rather, are using
settings.TIME_ZONE), which in most cases is not what the recipient of the
message is expecting.
2017-03-03 19:00:02 -08:00
Feorlen
6494b84193 Update WordPress webhook to say self-installed blogs are experimental.
Reword the doc to be clear that WordPress.com blogs are supported and
self-installed blogs are experimental. Change the screen captures to show
WordPress.com.

For more details, see:
original issue https://github.com/zulip/zulip/issues/3245
original PR https://github.com/zulip/zulip/pull/2691
2017-03-03 17:15:32 -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
e1d73ea36f github: Add list and fixtures for ignored events to webhook. 2017-02-26 19:17:53 -08:00
Tomasz Kolek
349835e619 Add PR edited, assigned and unassigned to github webhook integration. 2017-02-26 19:16:12 -08:00
Tim Abbott
0383ff1dfd lint: Fix homeassistant PEP8 violations. 2017-02-18 21:51:14 -08:00