Commit Graph

18 Commits

Author SHA1 Message Date
Aditya Bansal 64ddfc6ac0 zerver/webhooks: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
Eeshan Garg a4979410f9 webhooks: Migrate most integrations to use check_send_webhook_message.
This commit migrates all of our webhooks to use
check_send_webhook_message, except the following:

beeminder: Rishi wanted to wait on this one.
teamcity: This one is slightly more work.

yo: This one is PM-only. I am still trying to decide whether we
    should have a force_private argument or something in
    check_send_webhook_message.

facebook: No point in migrating this, will be removed as part of
          #8433.

slack: Slightly more work too with the `channel_to_topics` feature.
       Warrants a longer discussion.
2018-03-16 19:23:50 -02:30
Eeshan Garg b6fc33e1da webhooks/gci: Update text to conform to doc style guide. 2018-03-08 08:19:32 -08:00
Eeshan Garg 4d410a5eb7 webhooks/gci: Update text.
This commit modifies the text to:

* Use number 1 for all steps and let Markdown take care of the rest.
* Removes the line that says this webhook is "experimental". It isn't
  anymore.
2018-02-24 06:21:02 -05:00
Eeshan Garg 457c5a7735 webhooks/gci: Support 'outoftime' event.
This commit adds support for the 'outoftime' event. Such an event
is triggered when the task deadline for a particular task has
passed.
2018-01-16 15:57:35 -08: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
Eeshan Garg 21008a49b9 webhooks/gci: Support approve-pending-pc event type.
This event is generated when a mentor approves a task but
GCI is still waiting on a student's parental consent.
2017-12-18 10:00:20 -08:00
Xavier Cooney 1262d14d39 mypy: Use Python 3 syntax in gci/view.py. 2017-12-08 18:34:26 -08:00
Tim Abbott d5bb45db60 webhooks/gci: Fix missing mypy annotation. 2017-11-28 14:08:44 -08:00
Sampriti Panda bea653fabc webhooks/gci: Improve message formatting.
* Use Student Name instead of Task Name in subject.
* Use Task Instance URL instead of Task Definition URL (and workaround
  for a bug in the API).
2017-11-28 13:53:42 -08:00
Tim Abbott 73a668e7ae python: Sort imports in webhooks. 2017-11-15 15:43:10 -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
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
Eeshan Garg fb17481a7f webhooks/gci: Support claim, comment, submit, approve event types. 2017-10-16 22:01:19 -07:00
Eeshan Garg 71eee35bce webhooks: Add a Google Code-in integration. 2017-10-09 09:04:39 -07:00