Eeshan Garg
02a32e246e
webhooks/gitlab: Support test payloads without an "action" attribute.
...
Payloads that don't have a payload['object_attributes']['action']
attribute are generated when GitLab sends a test payload to verify
if the webhook was set up successfully. In this case, we should
send a message notifying that the webhook was configured
successfully.
2017-11-19 20:56:10 -08:00
Tim Abbott
73a668e7ae
python: Sort imports in webhooks.
2017-11-15 15:43:10 -08:00
rht
bafba95eb7
Text-wrap the remaining long lines exceeding 110.
2017-11-15 10:58:03 -08:00
Tommy Ip
8480deb754
integration docs: Fix broken desk.com markdown.
2017-11-10 17:33:42 +00:00
Tommy Ip
325ca0df62
integration docs: Fix broken Stripe markdown.
...
More information: https://chat.zulip.org/#narrow/stream/issues/topic/.237336
2017-11-10 17:19:52 +00:00
Tommy Ip
7477fbb14e
docs: Remove dangling </p> tag.
...
Fixes #7336
2017-11-09 14:39:40 -08:00
rht
bb46bea44d
Remove usage of six.moves.text_type.
2017-11-09 10:00:00 -08:00
rht
04eaec64f0
zerver/webhooks: Text-wrap long lines exceeding 110.
2017-11-07 17:24:09 -08:00
neiljp (Neil Pilgrim)
d038bf89ac
mypy: Adjust pivotal/view.py function parameter type based on body.
2017-11-07 11:26:46 -08:00
rht
549a26860f
refactor: Remove six.moves.range import.
2017-11-07 10:46:42 -08:00
rht
ec5120e807
refactor: Remove six.moves.zip import.
2017-11-07 10:46:42 -08:00
rht
19bd335cbb
Change urllib import to be Python 3-specific.
2017-11-07 10:46:42 -08:00
rht
8990b1046d
zerver: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
neiljp (Neil Pilgrim)
42f5eea61f
mypy: Improve typing of request.pyi (REQ).
...
This expands request.pyi to type-check the arguments passed into REQ.
Tweaked by tabbott to fix the report.py annotations.
2017-11-04 20:26:03 -07:00
neiljp (Neil Pilgrim)
720df640e7
mypy: Set freshdesk TicketDict to inherit from typed Dict.
2017-11-04 19:47:45 -07: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
Eeshan Garg
20f3e9b779
webhooks/gci: Support 'needswork' event_type.
...
This commit adds support for payloads that are generated when a
mentor submits a task for more work.
2017-11-02 16:46:11 -02:30
Eeshan Garg
9969a3a40b
webhooks/gci: Replace 'type' -> 'event_type', 'uuid' -> 'id'.
2017-11-02 16:39:48 -02:30
neiljp (Neil Pilgrim)
7d8de37299
mypy: Specify librato Callable type.
2017-10-31 00:03:35 -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
rht
c4fcff7178
refactor: Replace super(.*self) with Python 3-specific super().
...
We change all the instances except for the `test_helpers.py`
TimeTrackingCursor monkey-patching, which actually needs to specify
the base class.
2017-10-30 14:30:25 -07:00
Steve Howell
655f37a34b
Rename subject_name in send_message_backend().
2017-10-27 10:48:11 -07:00
Tim Abbott
8e2cdedf9a
lint: Fix lines in Python codebase longer than 120 characters.
2017-10-26 17:47:30 -07:00
Tim Abbott
b936e8c24b
lint: Fix lines in Python codebase longer than 125 characters.
2017-10-26 17:36:54 -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
Eeshan Garg
bd814eea2b
webhooks/taiga: Support relateduserstory events.
...
This commit adds support for the following:
1. When a user story is added to an epic.
2. When a user story is removed from an epic.
2017-10-25 10:59:58 -07:00
Eeshan Garg
f8b5976335
webhooks/taiga: Support Epic events.
2017-10-23 11:09:43 -07:00
derAnfaenger
cfadb43b93
codebase: Remove multiple whitespaces after comma.
2017-10-18 10:04:23 -07:00
Eeshan Garg
fb17481a7f
webhooks/gci: Support claim, comment, submit, approve event types.
2017-10-16 22:01:19 -07:00
neiljp (Neil Pilgrim)
fc947d92e2
mypy: Improve return type in bitbucket2 webhook function.
2017-10-11 12:16:50 -07:00
Eeshan Garg
71eee35bce
webhooks: Add a Google Code-in integration.
2017-10-09 09:04:39 -07:00
Tim Abbott
e3c395f247
webhooks: Remove use of get_user_profile_by_email.
...
This function is deprecated.
2017-10-02 15:28:44 -07:00
Eeshan Garg
32bd609361
webhooks/yo: Migrate to check_send_private_message.
2017-10-02 15:27:26 -07:00
Eeshan Garg
d20b57c20d
webhooks/teamcity: Migrate to check_send_private_message.
2017-10-02 15:27:26 -07:00
derAnfaenger
d1afab7199
Replace deprecated Logging.warn calls with Logging.warning.
2017-10-02 11:11:42 +02:00
Eeshan Garg
86c2c7ad34
webhooks: Migrate to check_send_stream_message.
...
This commit migrates all webhooks to use check_send_stream_message
instead of check_send_message. The only two webhooks that still
use check_send_message are our yo and teamcity webhooks. They
both use check_send_message for private messages.
2017-09-30 17:48:55 -07:00
Eeshan Garg
da3c008872
webhooks/trello: Remove trello/view/templates.py.
...
TRELLO_MESSAGE_TEMPLATE and TRELLO_SUBJECT_TEMPLATE are
redundant. This commit removes them. Now, subjects don't end
in periods. And where a period is necessary in the message body,
one is appended at the end of the specific template for that
message.
2017-09-28 10:58:07 -07:00
Marco Matarazzo
a6b83def8f
webhooks/trello: Support updating Card descriptions.
...
We now support events that add, change or remove Trello Card
descriptions.
Minor fixes by eeshangarg.
2017-09-28 10:58:07 -07:00
Marco Matarazzo
765f8e7d41
webhooks/trello: Display Card comment's text in notifications.
...
Now, when someone makes a comment on a Trello Card, the text
of the comment is quoted in the notification.
Minor fixes by eeshangarg.
2017-09-28 10:58:07 -07:00
rht
7115a29bee
zerver/webhooks: Remove absolute_import.
2017-09-27 10:00:39 -07:00
neiljp (Neil Pilgrim)
e6daee441b
mypy: Adjust board_actions.py to allow Optional[Text] values.
2017-09-25 16:02:56 -07:00
Eeshan Garg
a041a23199
webhooks/trello: Ignore when Board background is changed.
...
I feel like getting notifications about a board's background being
changed isn't very useful information and could interrupt the flow
of other important information such as Card changes or movement,
so I think we should not support this event and
should simply ignore such payloads in the future.
2017-09-15 01:02:47 -07:00
Tim Abbott
27101ae931
trello: Use client_head wrapper in tests.
2017-08-26 13:45:27 -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
31986d1b94
github_webhook: Update "pull_request unassigned" event fixture.
...
The older fixture for this event assumed that the "assignee" key
had a value of '{}' if no one was assigned to a PR anymore.
However, that is no longer true because testing with requestbin
showed that in the latest JSON payload for this event, the key
"assignee" now has the value of 'null' (None when converted to
Python) when a user is unassigned from a PR. The current code
didn't handle this correctly. This commit makes sure it does!
Its unclear as to whether the old fixture was simply wrong or
whether GitHub changed its payloads in any way.
2017-08-24 16:48:00 -07:00
Robert Hönig
18a080cd6c
Don't handle json payload key errors inside webhooks.
...
Fixes first part of #6213 .
2017-08-24 11:33:14 -07:00
Robert Hönig
c5f0478374
linter: Add trailing whitespace check for json files.
2017-08-15 09:28:11 -07:00
Robert Hönig
4be814fc16
integrations: Add OpsGenie integration.
2017-08-15 08:42:19 -07:00