forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrations: Add ClickUp integration.
Creates an incoming webhook integration for ClickUp. The main use case is getting notifications when new ClickUp items such as task, list, folder, space, goals are created, updated or deleted. Fixes zulip#26529.
- Loading branch information
Showing
12 changed files
with
438 additions
and
288 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from enum import Enum | ||
from typing import List | ||
|
||
|
||
class ConstantVariable(Enum): | ||
@classmethod | ||
def as_list(cls) -> List[str]: | ||
return [item.value for item in cls] | ||
|
||
|
||
class EventItemType(ConstantVariable): | ||
TASK: str = "task" | ||
LIST: str = "list" | ||
FOLDER: str = "folder" | ||
GOAL: str = "goal" | ||
SPACE: str = "space" | ||
|
||
|
||
class EventAcion(ConstantVariable): | ||
CREATED: str = "Created" | ||
UPDATED: str = "Updated" | ||
DELETED: str = "Deleted" | ||
|
||
|
||
class SimpleFields(ConstantVariable): | ||
# Events with identical payload format | ||
PRIORITY: str = "priority" | ||
STATUS: str = "status" | ||
|
||
|
||
class SpecialFields(ConstantVariable): | ||
# Event with unique payload | ||
NAME: str = "name" | ||
ASSIGNEE: str = "assignee_add" | ||
COMMENT: str = "comment" | ||
DUE_DATE: str = "due_date" | ||
MOVED: str = "section_moved" | ||
TIME_ESTIMATE: str = "time_estimate" | ||
TIME_SPENT: str = "time_spent" | ||
|
||
|
||
class SpammyFields(ConstantVariable): | ||
TAG: str = "tag" | ||
TAG_REMOVED: str = "tag_removed" | ||
UNASSIGN: str = "assignee_rem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
zerver/webhooks/clickup/callback_fixtures/get_folder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"id": "457", | ||
"name": "Lord Foldemort", | ||
"orderindex": 0, | ||
"override_statuses": false, | ||
"hidden": false, | ||
"space": { | ||
"id": "789", | ||
"name": "Space Name", | ||
"access": true | ||
}, | ||
"task_count": "0", | ||
"lists": [] | ||
"id": "457", | ||
"name": "Lord Foldemort", | ||
"orderindex": 0, | ||
"override_statuses": false, | ||
"hidden": false, | ||
"space": { | ||
"id": "789", | ||
"name": "Space Name", | ||
"access": true | ||
}, | ||
"task_count": "0", | ||
"lists": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"goal": { | ||
"id": "e53a033c-900e-462d-a849-4a216b06d930", | ||
"name": "hat-trick", | ||
"team_id": "512", | ||
"date_created": "1568044355026", | ||
"start_date": null, | ||
"due_date": "1568036964079", | ||
"description": "Updated Goal Description", | ||
"private": false, | ||
"archived": false, | ||
"creator": 183, | ||
"color": "#32a852", | ||
"pretty_id": "6", | ||
"multiple_owners": true, | ||
"folder_id": null, | ||
"members": [], | ||
"owners": [ | ||
{ | ||
"id": 182, | ||
"username": "Pieter CK", | ||
"email": "[email protected]", | ||
"color": "#7b68ee", | ||
"initials": "PK", | ||
"profilePicture": "https://attachments-public.clickup.com/profilePictures/182_abc.jpg" | ||
} | ||
], | ||
"key_results": [], | ||
"percent_completed": 0, | ||
"history": [], | ||
"pretty_url": "https://app.clickup.com/512/goals/6" | ||
"id": "e53a033c-900e-462d-a849-4a216b06d930", | ||
"name": "hat-trick", | ||
"team_id": "512", | ||
"date_created": "1568044355026", | ||
"start_date": null, | ||
"due_date": "1568036964079", | ||
"description": "Updated Goal Description", | ||
"private": false, | ||
"archived": false, | ||
"creator": 183, | ||
"color": "#32a852", | ||
"pretty_id": "6", | ||
"multiple_owners": true, | ||
"folder_id": null, | ||
"members": [], | ||
"owners": [ | ||
{ | ||
"id": 182, | ||
"username": "Pieter CK", | ||
"email": "[email protected]", | ||
"color": "#7b68ee", | ||
"initials": "PK", | ||
"profilePicture": "https://attachments-public.clickup.com/profilePictures/182_abc.jpg" | ||
} | ||
], | ||
"key_results": [], | ||
"percent_completed": 0, | ||
"history": [], | ||
"pretty_url": "https://app.clickup.com/512/goals/6" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.