Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 620 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 39 KiB |
|
@ -388,7 +388,6 @@ WEBHOOK_INTEGRATIONS: list[WebhookIntegration] = [
|
||||||
WebhookIntegration("buildbot", ["continuous-integration"], display_name="Buildbot"),
|
WebhookIntegration("buildbot", ["continuous-integration"], display_name="Buildbot"),
|
||||||
WebhookIntegration("canarytoken", ["monitoring"], display_name="Thinkst Canarytokens"),
|
WebhookIntegration("canarytoken", ["monitoring"], display_name="Thinkst Canarytokens"),
|
||||||
WebhookIntegration("circleci", ["continuous-integration"], display_name="CircleCI"),
|
WebhookIntegration("circleci", ["continuous-integration"], display_name="CircleCI"),
|
||||||
WebhookIntegration("clubhouse", ["project-management"]),
|
|
||||||
WebhookIntegration("codeship", ["continuous-integration", "deployment"]),
|
WebhookIntegration("codeship", ["continuous-integration", "deployment"]),
|
||||||
WebhookIntegration("crashlytics", ["monitoring"]),
|
WebhookIntegration("crashlytics", ["monitoring"]),
|
||||||
WebhookIntegration("dialogflow", ["customer-support"], display_name="Dialogflow"),
|
WebhookIntegration("dialogflow", ["customer-support"], display_name="Dialogflow"),
|
||||||
|
@ -494,6 +493,7 @@ WEBHOOK_INTEGRATIONS: list[WebhookIntegration] = [
|
||||||
display_name="Slack-compatible webhook",
|
display_name="Slack-compatible webhook",
|
||||||
logo="images/integrations/logos/slack.svg",
|
logo="images/integrations/logos/slack.svg",
|
||||||
),
|
),
|
||||||
|
WebhookIntegration("shortcut", ["project-management"], legacy_names=["clubhouse"]),
|
||||||
WebhookIntegration("slack", ["communication"]),
|
WebhookIntegration("slack", ["communication"]),
|
||||||
WebhookIntegration("sonarqube", ["continuous-integration"], display_name="SonarQube"),
|
WebhookIntegration("sonarqube", ["continuous-integration"], display_name="SonarQube"),
|
||||||
WebhookIntegration("sonarr", ["entertainment"], display_name="Sonarr"),
|
WebhookIntegration("sonarr", ["entertainment"], display_name="Sonarr"),
|
||||||
|
@ -757,7 +757,6 @@ DOC_SCREENSHOT_CONFIG: dict[str, list[BaseScreenshotConfig]] = {
|
||||||
ScreenshotConfig("bitbucket_job_completed.json", image_name="001.png"),
|
ScreenshotConfig("bitbucket_job_completed.json", image_name="001.png"),
|
||||||
ScreenshotConfig("github_job_completed.json", image_name="002.png"),
|
ScreenshotConfig("github_job_completed.json", image_name="002.png"),
|
||||||
],
|
],
|
||||||
"clubhouse": [ScreenshotConfig("story_create.json")],
|
|
||||||
"codeship": [ScreenshotConfig("error_build.json")],
|
"codeship": [ScreenshotConfig("error_build.json")],
|
||||||
"crashlytics": [ScreenshotConfig("issue_message.json")],
|
"crashlytics": [ScreenshotConfig("issue_message.json")],
|
||||||
"delighted": [ScreenshotConfig("survey_response_updated_promoter.json")],
|
"delighted": [ScreenshotConfig("survey_response_updated_promoter.json")],
|
||||||
|
@ -822,6 +821,7 @@ DOC_SCREENSHOT_CONFIG: dict[str, list[BaseScreenshotConfig]] = {
|
||||||
ScreenshotConfig("event_for_exception_python.json"),
|
ScreenshotConfig("event_for_exception_python.json"),
|
||||||
ScreenshotConfig("issue_assigned_to_team.json", "002.png"),
|
ScreenshotConfig("issue_assigned_to_team.json", "002.png"),
|
||||||
],
|
],
|
||||||
|
"shortcut": [ScreenshotConfig("story_create.json")],
|
||||||
"slack": [ScreenshotConfig("message_info.txt")],
|
"slack": [ScreenshotConfig("message_info.txt")],
|
||||||
"sonarqube": [ScreenshotConfig("error.json")],
|
"sonarqube": [ScreenshotConfig("error.json")],
|
||||||
"sonarr": [ScreenshotConfig("sonarr_episode_grabbed.json")],
|
"sonarr": [ScreenshotConfig("sonarr_episode_grabbed.json")],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Zulip Clubhouse integration
|
# Zulip Shortcut integration
|
||||||
|
|
||||||
Get Zulip notifications for your Clubhouse Stories and Epics!
|
Get Zulip notifications for your Shortcut Stories and Epics!
|
||||||
|
|
||||||
{start_tabs}
|
{start_tabs}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Get Zulip notifications for your Clubhouse Stories and Epics!
|
||||||
|
|
||||||
1. {!generate-webhook-url-basic.md!}
|
1. {!generate-webhook-url-basic.md!}
|
||||||
|
|
||||||
1. Go to your Clubhouse Dashboard, and click on the settings icon in the
|
1. Go to your Shortcut Dashboard, and click on your profile icon in the
|
||||||
top-right corner. Go to **Integrations**, and select **Webhooks**.
|
top-right corner. Go to **Integrations**, and select **Webhooks**.
|
||||||
Click **+ Add New Webhook**.
|
Click **+ Add New Webhook**.
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Get Zulip notifications for your Clubhouse Stories and Epics!
|
||||||
|
|
||||||
{!congrats.md!}
|
{!congrats.md!}
|
||||||
|
|
||||||
![](/static/images/integrations/clubhouse/001.png)
|
![](/static/images/integrations/shortcut/001.png)
|
||||||
|
|
||||||
{!event-filtering-additional-feature.md!}
|
{!event-filtering-additional-feature.md!}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"id":23,
|
"id":23,
|
||||||
"entity_type":"story",
|
"entity_type":"story",
|
||||||
"action":"create",
|
"action":"create",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/23",
|
"app_url":"https://app.shortcut.com/zulip/story/23",
|
||||||
"description":"",
|
"description":"",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"name":"An epic story!",
|
"name":"An epic story!",
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add super cool feature!",
|
"name":"Add super cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"subject_story_link_ids":{
|
"subject_story_link_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -9,7 +9,7 @@
|
||||||
"id":17,
|
"id":17,
|
||||||
"entity_type":"epic",
|
"entity_type":"epic",
|
||||||
"action":"delete",
|
"action":"delete",
|
||||||
"name":"Clubhouse Fork"
|
"name":"Shortcut Fork"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Story 2",
|
"name":"Story 2",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/9",
|
"app_url":"https://app.shortcut.com/zulip/story/9",
|
||||||
"changes":{
|
"changes":{
|
||||||
"archived":{
|
"archived":{
|
||||||
"new":true,
|
"new":true,
|
|
@ -25,7 +25,7 @@
|
||||||
"entity_type":"story",
|
"entity_type":"story",
|
||||||
"name":"Add super cool feature!",
|
"name":"Add super cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11"
|
"app_url":"https://app.shortcut.com/zulip/story/11"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"create",
|
"action":"create",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"project_id":6,
|
"project_id":6,
|
||||||
"description":"We should probably add this cool feature!",
|
"description":"We should probably add this cool feature!",
|
||||||
"workflow_state_id":500000008,
|
"workflow_state_id":500000008,
|
|
@ -25,7 +25,7 @@
|
||||||
"entity_type":"story",
|
"entity_type":"story",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11"
|
"app_url":"https://app.shortcut.com/zulip/story/11"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -18,7 +18,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"task_ids":{
|
"task_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -17,7 +17,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"task_ids":{
|
"task_ids":{
|
||||||
"removes":[
|
"removes":[
|
|
@ -25,7 +25,7 @@
|
||||||
"entity_type":"story",
|
"entity_type":"story",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11"
|
"app_url":"https://app.shortcut.com/zulip/story/11"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Story 2",
|
"name":"Story 2",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/9",
|
"app_url":"https://app.shortcut.com/zulip/story/9",
|
||||||
"changes":{
|
"changes":{
|
||||||
"archived":{
|
"archived":{
|
||||||
"new":false,
|
"new":false,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"file_ids":{
|
"file_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -18,7 +18,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"comment_ids":{
|
"comment_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Story 2",
|
"name":"Story 2",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/9",
|
"app_url":"https://app.shortcut.com/zulip/story/9",
|
||||||
"changes":{
|
"changes":{
|
||||||
"description":{
|
"description":{
|
||||||
"new":"Added a description.",
|
"new":"Added a description.",
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"epic_id":{
|
"epic_id":{
|
||||||
"new":7
|
"new":7
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"estimate":{
|
"estimate":{
|
||||||
"new":4
|
"new":4
|
|
@ -17,7 +17,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Testing pull requests with Story",
|
"name":"Testing pull requests with Story",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/27",
|
"app_url":"https://app.shortcut.com/zulip/story/27",
|
||||||
"changes":{
|
"changes":{
|
||||||
"branch_ids":{
|
"branch_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -25,7 +25,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "Story1",
|
"name": "Story1",
|
||||||
"story_type": "feature",
|
"story_type": "feature",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/17",
|
"app_url": "https://app.shortcut.com/pig208/story/17",
|
||||||
"changes": {
|
"changes": {
|
||||||
"pull_request_ids": {
|
"pull_request_ids": {
|
||||||
"adds": [
|
"adds": [
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "Story2",
|
"name": "Story2",
|
||||||
"story_type": "feature",
|
"story_type": "feature",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/18",
|
"app_url": "https://app.shortcut.com/pig208/story/18",
|
||||||
"changes": {
|
"changes": {
|
||||||
"pull_request_ids": {
|
"pull_request_ids": {
|
||||||
"adds": [
|
"adds": [
|
|
@ -18,7 +18,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new1",
|
"name": "new1",
|
||||||
"story_type": "feature",
|
"story_type": "feature",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/26",
|
"app_url": "https://app.shortcut.com/pig208/story/26",
|
||||||
"changes": {
|
"changes": {
|
||||||
"pull_request_ids": {
|
"pull_request_ids": {
|
||||||
"adds": [
|
"adds": [
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new2",
|
"name": "new2",
|
||||||
"story_type": "feature",
|
"story_type": "feature",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/27",
|
"app_url": "https://app.shortcut.com/pig208/story/27",
|
||||||
"changes": {
|
"changes": {
|
||||||
"pull_request_ids": {
|
"pull_request_ids": {
|
||||||
"adds": [
|
"adds": [
|
|
@ -30,7 +30,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Testing pull requests with Story",
|
"name":"Testing pull requests with Story",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/28",
|
"app_url":"https://app.shortcut.com/zulip/story/28",
|
||||||
"changes":{
|
"changes":{
|
||||||
"started":{
|
"started":{
|
||||||
"new":true,
|
"new":true,
|
|
@ -18,7 +18,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "asd2",
|
"name": "asd2",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/15",
|
"app_url": "https://app.shortcut.com/pig208/story/15",
|
||||||
"changes":
|
"changes":
|
||||||
{
|
{
|
||||||
"pull_request_ids": {
|
"pull_request_ids": {
|
|
@ -30,7 +30,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Testing pull requests with Story",
|
"name":"Testing pull requests with Story",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/28",
|
"app_url":"https://app.shortcut.com/zulip/story/28",
|
||||||
"changes":{
|
"changes":{
|
||||||
"started":{
|
"started":{
|
||||||
"new":true,
|
"new":true,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"An epic story!",
|
"name":"An epic story!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/23",
|
"app_url":"https://app.shortcut.com/zulip/story/23",
|
||||||
"changes":{
|
"changes":{
|
||||||
"label_ids":{
|
"label_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"id":11200,
|
"id":11200,
|
||||||
"app_url":"https:\/\/app.clubhouse.io\/zulip\/story\/28",
|
"app_url":"https:\/\/app.shortcut.com\/zulip\/story\/28",
|
||||||
"name":"An emotional story!"
|
"name":"An emotional story!"
|
||||||
},
|
},
|
||||||
{
|
{
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"An epic story!",
|
"name":"An epic story!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/23",
|
"app_url":"https://app.shortcut.com/zulip/story/23",
|
||||||
"changes":{
|
"changes":{
|
||||||
"label_ids":{
|
"label_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"A new story by Shakespeare!",
|
"name":"A new story by Shakespeare!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/26",
|
"app_url":"https://app.shortcut.com/zulip/story/26",
|
||||||
"changes":{
|
"changes":{
|
||||||
"owner_ids":{
|
"owner_ids":{
|
||||||
"adds":[
|
"adds":[
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"epic_id":{
|
"epic_id":{
|
||||||
"new":17,
|
"new":17,
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
{
|
{
|
||||||
"id":17,
|
"id":17,
|
||||||
"entity_type":"epic",
|
"entity_type":"epic",
|
||||||
"name":"Clubhouse Fork"
|
"name":"Shortcut Fork"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id":7,
|
"id":7,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"estimate":{
|
"estimate":{
|
||||||
"new":4,
|
"new":4,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"project_id":{
|
"project_id":{
|
||||||
"new":16,
|
"new":16,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"started":{
|
"started":{
|
||||||
"new":true,
|
"new":true,
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add super cool feature!",
|
"name":"Add super cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"name":{
|
"name":{
|
||||||
"new":"Add super cool feature!",
|
"new":"Add super cool feature!",
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"story_type":{
|
"story_type":{
|
||||||
"new":"bug",
|
"new":"bug",
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"description":{
|
"description":{
|
||||||
"new":"We should probably add this cool feature! Just edited this. :)",
|
"new":"We should probably add this cool feature! Just edited this. :)",
|
|
@ -10,7 +10,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "asd4",
|
"name": "asd4",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/17",
|
"app_url": "https://app.shortcut.com/pig208/story/17",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new1",
|
"name": "new1",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/26",
|
"app_url": "https://app.shortcut.com/pig208/story/26",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new2",
|
"name": "new2",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/27",
|
"app_url": "https://app.shortcut.com/pig208/story/27",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -198,19 +198,19 @@
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"entity_type": "label",
|
"entity_type": "label",
|
||||||
"name": "low priority",
|
"name": "low priority",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/label/8"
|
"app_url": "https://app.shortcut.com/pig208/label/8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 23,
|
"id": 23,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "testeipc",
|
"name": "testeipc",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/23"
|
"app_url": "https://app.shortcut.com/pig208/epic/23"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "Product Development",
|
"name": "Product Development",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/2"
|
"app_url": "https://app.shortcut.com/pig208/project/2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
||||||
|
@ -221,13 +221,13 @@
|
||||||
"id": 29,
|
"id": 29,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "epic",
|
"name": "epic",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/29"
|
"app_url": "https://app.shortcut.com/pig208/epic/29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "test2",
|
"name": "test2",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/28"
|
"app_url": "https://app.shortcut.com/pig208/project/28"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "asd4",
|
"name": "asd4",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/17",
|
"app_url": "https://app.shortcut.com/pig208/story/17",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new1",
|
"name": "new1",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/26",
|
"app_url": "https://app.shortcut.com/pig208/story/26",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new2",
|
"name": "new2",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/27",
|
"app_url": "https://app.shortcut.com/pig208/story/27",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -198,19 +198,19 @@
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"entity_type": "label",
|
"entity_type": "label",
|
||||||
"name": "low priority",
|
"name": "low priority",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/label/8"
|
"app_url": "https://app.shortcut.com/pig208/label/8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 23,
|
"id": 23,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "testeipc",
|
"name": "testeipc",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/23"
|
"app_url": "https://app.shortcut.com/pig208/epic/23"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "Product Development",
|
"name": "Product Development",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/2"
|
"app_url": "https://app.shortcut.com/pig208/project/2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
||||||
|
@ -221,13 +221,13 @@
|
||||||
"id": 29,
|
"id": 29,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "epic",
|
"name": "epic",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/29"
|
"app_url": "https://app.shortcut.com/pig208/epic/29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "test2",
|
"name": "test2",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/28"
|
"app_url": "https://app.shortcut.com/pig208/project/28"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "asd4",
|
"name": "asd4",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/17",
|
"app_url": "https://app.shortcut.com/pig208/story/17",
|
||||||
"changes": {
|
"changes": {
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"new": "bug",
|
"new": "bug",
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new1",
|
"name": "new1",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/26",
|
"app_url": "https://app.shortcut.com/pig208/story/26",
|
||||||
"changes": {
|
"changes": {
|
||||||
"epic_id": {
|
"epic_id": {
|
||||||
"new": 23,
|
"new": 23,
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new2",
|
"name": "new2",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/27",
|
"app_url": "https://app.shortcut.com/pig208/story/27",
|
||||||
"changes": {
|
"changes": {
|
||||||
"label_ids": {
|
"label_ids": {
|
||||||
"adds": [
|
"adds": [
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new3",
|
"name": "new3",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/28",
|
"app_url": "https://app.shortcut.com/pig208/story/28",
|
||||||
"changes": {
|
"changes": {
|
||||||
"workflow_state_id": {
|
"workflow_state_id": {
|
||||||
"new": 500000010,
|
"new": 500000010,
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new4",
|
"name": "new4",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/29",
|
"app_url": "https://app.shortcut.com/pig208/story/29",
|
||||||
"changes": {
|
"changes": {
|
||||||
"project_id": {
|
"project_id": {
|
||||||
"new": 28,
|
"new": 28,
|
||||||
|
@ -98,19 +98,19 @@
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"entity_type": "label",
|
"entity_type": "label",
|
||||||
"name": "low priority",
|
"name": "low priority",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/label/8"
|
"app_url": "https://app.shortcut.com/pig208/label/8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 23,
|
"id": 23,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "testeipc",
|
"name": "testeipc",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/23"
|
"app_url": "https://app.shortcut.com/pig208/epic/23"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "Product Development",
|
"name": "Product Development",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/2"
|
"app_url": "https://app.shortcut.com/pig208/project/2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
"id": "6071adb0-641f-46c4-b5e1-4945dae399ea",
|
||||||
|
@ -121,13 +121,13 @@
|
||||||
"id": 29,
|
"id": 29,
|
||||||
"entity_type": "epic",
|
"entity_type": "epic",
|
||||||
"name": "epic",
|
"name": "epic",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/epic/29"
|
"app_url": "https://app.shortcut.com/pig208/epic/29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"entity_type": "project",
|
"entity_type": "project",
|
||||||
"name": "test2",
|
"name": "test2",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/project/28"
|
"app_url": "https://app.shortcut.com/pig208/project/28"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "asd4",
|
"name": "asd4",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/17",
|
"app_url": "https://app.shortcut.com/pig208/story/17",
|
||||||
"changes": {
|
"changes": {
|
||||||
"deadline": {
|
"deadline": {
|
||||||
"new": "2021-04-12T16:00:00Z",
|
"new": "2021-04-12T16:00:00Z",
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new1",
|
"name": "new1",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/26",
|
"app_url": "https://app.shortcut.com/pig208/story/26",
|
||||||
"changes": {
|
"changes": {
|
||||||
"owner_ids": {
|
"owner_ids": {
|
||||||
"adds": [
|
"adds": [
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"action": "update",
|
"action": "update",
|
||||||
"name": "new2",
|
"name": "new2",
|
||||||
"story_type": "bug",
|
"story_type": "bug",
|
||||||
"app_url": "https://app.clubhouse.io/pig208/story/27",
|
"app_url": "https://app.shortcut.com/pig208/story/27",
|
||||||
"changes": {
|
"changes": {
|
||||||
"follower_ids": {
|
"follower_ids": {
|
||||||
"adds": [
|
"adds": [
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"file_ids":{
|
"file_ids":{
|
||||||
"removes":[
|
"removes":[
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"description":{
|
"description":{
|
||||||
"new":"",
|
"new":"",
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"epic_id":{
|
"epic_id":{
|
||||||
"old":7
|
"old":7
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"Add cool feature!",
|
"name":"Add cool feature!",
|
||||||
"story_type":"bug",
|
"story_type":"bug",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/11",
|
"app_url":"https://app.shortcut.com/zulip/story/11",
|
||||||
"changes":{
|
"changes":{
|
||||||
"estimate":{
|
"estimate":{
|
||||||
"old":4
|
"old":4
|
|
@ -11,7 +11,7 @@
|
||||||
"action":"update",
|
"action":"update",
|
||||||
"name":"An epic story!",
|
"name":"An epic story!",
|
||||||
"story_type":"feature",
|
"story_type":"feature",
|
||||||
"app_url":"https://app.clubhouse.io/zulip/story/23",
|
"app_url":"https://app.shortcut.com/zulip/story/23",
|
||||||
"changes":{
|
"changes":{
|
||||||
"label_ids":{
|
"label_ids":{
|
||||||
"removes":[
|
"removes":[
|
|
@ -4,13 +4,14 @@ from unittest.mock import MagicMock, call, patch
|
||||||
from zerver.lib.test_classes import WebhookTestCase
|
from zerver.lib.test_classes import WebhookTestCase
|
||||||
|
|
||||||
|
|
||||||
class ClubhouseWebhookTest(WebhookTestCase):
|
class ShortcutWebhookTest(WebhookTestCase):
|
||||||
CHANNEL_NAME = "clubhouse"
|
CHANNEL_NAME = "shortcut"
|
||||||
URL_TEMPLATE = "/api/v1/external/clubhouse?stream={stream}&api_key={api_key}"
|
URL_TEMPLATE = "/api/v1/external/shortcut?stream={stream}&api_key={api_key}"
|
||||||
WEBHOOK_DIR_NAME = "clubhouse"
|
LEGACY_URL_TEMPLATES = ["/api/v1/external/clubhouse?stream={stream}&api_key={api_key}"]
|
||||||
|
WEBHOOK_DIR_NAME = "shortcut"
|
||||||
|
|
||||||
def test_story_create(self) -> None:
|
def test_story_create(self) -> None:
|
||||||
expected_message = "New story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) of type **feature** was created."
|
expected_message = "New story [Add cool feature!](https://app.shortcut.com/zulip/story/11) of type **feature** was created."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_create",
|
"story_create",
|
||||||
"Add cool feature!",
|
"Add cool feature!",
|
||||||
|
@ -22,7 +23,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.check_webhook("story_delete", "New random story", expected_message)
|
self.check_webhook("story_delete", "New random story", expected_message)
|
||||||
|
|
||||||
def test_epic_story_create(self) -> None:
|
def test_epic_story_create(self) -> None:
|
||||||
expected_message = "New story [An epic story!](https://app.clubhouse.io/zulip/story/23) was created and added to the epic **New Cool Epic!**."
|
expected_message = "New story [An epic story!](https://app.shortcut.com/zulip/story/23) was created and added to the epic **New Cool Epic!**."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"epic_create_story",
|
"epic_create_story",
|
||||||
"An epic story!",
|
"An epic story!",
|
||||||
|
@ -30,12 +31,12 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_epic_delete(self) -> None:
|
def test_epic_delete(self) -> None:
|
||||||
expected_message = "The epic **Clubhouse Fork** was deleted."
|
expected_message = "The epic **Shortcut Fork** was deleted."
|
||||||
self.check_webhook("epic_delete", "Clubhouse Fork", expected_message)
|
self.check_webhook("epic_delete", "Shortcut Fork", expected_message)
|
||||||
|
|
||||||
def test_story_archive(self) -> None:
|
def test_story_archive(self) -> None:
|
||||||
expected_message = (
|
expected_message = (
|
||||||
"The story [Story 2](https://app.clubhouse.io/zulip/story/9) was archived."
|
"The story [Story 2](https://app.shortcut.com/zulip/story/9) was archived."
|
||||||
)
|
)
|
||||||
self.check_webhook("story_archive", "Story 2", expected_message)
|
self.check_webhook("story_archive", "Story 2", expected_message)
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
|
|
||||||
def test_story_unarchive(self) -> None:
|
def test_story_unarchive(self) -> None:
|
||||||
expected_message = (
|
expected_message = (
|
||||||
"The story [Story 2](https://app.clubhouse.io/zulip/story/9) was unarchived."
|
"The story [Story 2](https://app.shortcut.com/zulip/story/9) was unarchived."
|
||||||
)
|
)
|
||||||
self.check_webhook("story_unarchive", "Story 2", expected_message)
|
self.check_webhook("story_unarchive", "Story 2", expected_message)
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.check_webhook("epic_update_add_comment", "New Cool Epic!", expected_message)
|
self.check_webhook("epic_update_add_comment", "New Cool Epic!", expected_message)
|
||||||
|
|
||||||
def test_story_update_add_comment(self) -> None:
|
def test_story_update_add_comment(self) -> None:
|
||||||
expected_message = "New comment added to the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11):\n``` quote\nJust leaving a comment here!\n```"
|
expected_message = "New comment added to the story [Add cool feature!](https://app.shortcut.com/zulip/story/11):\n``` quote\nJust leaving a comment here!\n```"
|
||||||
self.check_webhook("story_update_add_comment", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_add_comment", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_epic_update_add_description(self) -> None:
|
def test_epic_update_add_description(self) -> None:
|
||||||
|
@ -74,15 +75,15 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.check_webhook("epic_update_change_description", "New Cool Epic!", expected_message)
|
self.check_webhook("epic_update_change_description", "New Cool Epic!", expected_message)
|
||||||
|
|
||||||
def test_story_update_add_description(self) -> None:
|
def test_story_update_add_description(self) -> None:
|
||||||
expected_message = "New description added to the story [Story 2](https://app.clubhouse.io/zulip/story/9):\n``` quote\nAdded a description.\n```"
|
expected_message = "New description added to the story [Story 2](https://app.shortcut.com/zulip/story/9):\n``` quote\nAdded a description.\n```"
|
||||||
self.check_webhook("story_update_add_description", "Story 2", expected_message)
|
self.check_webhook("story_update_add_description", "Story 2", expected_message)
|
||||||
|
|
||||||
def test_story_update_remove_description(self) -> None:
|
def test_story_update_remove_description(self) -> None:
|
||||||
expected_message = "Description for the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was removed."
|
expected_message = "Description for the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was removed."
|
||||||
self.check_webhook("story_update_remove_description", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_remove_description", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_update_change_description(self) -> None:
|
def test_story_update_change_description(self) -> None:
|
||||||
expected_message = "Description for the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was changed from:\n``` quote\nWe should probably add this cool feature!\n```\nto\n``` quote\nWe should probably add this cool feature! Just edited this. :)\n```"
|
expected_message = "Description for the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was changed from:\n``` quote\nWe should probably add this cool feature!\n```\nto\n``` quote\nWe should probably add this cool feature! Just edited this. :)\n```"
|
||||||
self.check_webhook("story_update_description", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_description", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_epic_update_change_state(self) -> None:
|
def test_epic_update_change_state(self) -> None:
|
||||||
|
@ -92,7 +93,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.check_webhook("epic_update_change_state", "New Cool Epic!", expected_message)
|
self.check_webhook("epic_update_change_state", "New Cool Epic!", expected_message)
|
||||||
|
|
||||||
def test_story_update_change_state(self) -> None:
|
def test_story_update_change_state(self) -> None:
|
||||||
expected_message = "State of the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was changed from **Unscheduled** to **Ready for Review**."
|
expected_message = "State of the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was changed from **Unscheduled** to **Ready for Review**."
|
||||||
self.check_webhook("story_update_change_state", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_change_state", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_epic_update_change_name(self) -> None:
|
def test_epic_update_change_name(self) -> None:
|
||||||
|
@ -100,28 +101,28 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.check_webhook("epic_update_change_title", "New Cool Epic!", expected_message)
|
self.check_webhook("epic_update_change_title", "New Cool Epic!", expected_message)
|
||||||
|
|
||||||
def test_story_update_change_name(self) -> None:
|
def test_story_update_change_name(self) -> None:
|
||||||
expected_message = "The name of the story [Add super cool feature!](https://app.clubhouse.io/zulip/story/11) was changed from:\n``` quote\nAdd cool feature!\n```\nto\n``` quote\nAdd super cool feature!\n```"
|
expected_message = "The name of the story [Add super cool feature!](https://app.shortcut.com/zulip/story/11) was changed from:\n``` quote\nAdd cool feature!\n```\nto\n``` quote\nAdd super cool feature!\n```"
|
||||||
self.check_webhook("story_update_change_title", "Add super cool feature!", expected_message)
|
self.check_webhook("story_update_change_title", "Add super cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_update_add_owner(self) -> None:
|
def test_story_update_add_owner(self) -> None:
|
||||||
expected_message = "New owner added to the story [A new story by Shakespeare!](https://app.clubhouse.io/zulip/story/26)."
|
expected_message = "New owner added to the story [A new story by Shakespeare!](https://app.shortcut.com/zulip/story/26)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_owner", "A new story by Shakespeare!", expected_message
|
"story_update_add_owner", "A new story by Shakespeare!", expected_message
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_story_task_created(self) -> None:
|
def test_story_task_created(self) -> None:
|
||||||
expected_message = "Task **Added a new task** was added to the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11)."
|
expected_message = "Task **Added a new task** was added to the story [Add cool feature!](https://app.shortcut.com/zulip/story/11)."
|
||||||
self.check_webhook("story_task_create", "Add cool feature!", expected_message)
|
self.check_webhook("story_task_create", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_task_deleted(self) -> None:
|
def test_story_task_deleted(self) -> None:
|
||||||
expected_message = "Task **Added a new task** was removed from the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11)."
|
expected_message = "Task **Added a new task** was removed from the story [Add cool feature!](https://app.shortcut.com/zulip/story/11)."
|
||||||
self.check_webhook("story_task_delete", "Add cool feature!", expected_message)
|
self.check_webhook("story_task_delete", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_task_completed(self) -> None:
|
def test_story_task_completed(self) -> None:
|
||||||
expected_message = "Task **A new task for this story** ([Add cool feature!](https://app.clubhouse.io/zulip/story/11)) was completed. :tada:"
|
expected_message = "Task **A new task for this story** ([Add cool feature!](https://app.shortcut.com/zulip/story/11)) was completed. :tada:"
|
||||||
self.check_webhook("story_task_complete", "Add cool feature!", expected_message)
|
self.check_webhook("story_task_complete", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_task_incomplete_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
def test_story_task_incomplete_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||||
payload = self.get_body("story_task_not_complete")
|
payload = self.get_body("story_task_not_complete")
|
||||||
result = self.client_post(self.url, payload, content_type="application/json")
|
result = self.client_post(self.url, payload, content_type="application/json")
|
||||||
|
@ -130,36 +131,36 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
|
|
||||||
def test_story_epic_changed(self) -> None:
|
def test_story_epic_changed(self) -> None:
|
||||||
expected_message = (
|
expected_message = (
|
||||||
"The story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was moved from **Release 1.9**"
|
"The story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was moved from **Release 1.9**"
|
||||||
" to **Clubhouse Fork**."
|
" to **Shortcut Fork**."
|
||||||
)
|
)
|
||||||
self.check_webhook("story_update_change_epic", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_change_epic", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_epic_added(self) -> None:
|
def test_story_epic_added(self) -> None:
|
||||||
expected_message = "The story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was added to the epic **Release 1.9**."
|
expected_message = "The story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was added to the epic **Release 1.9**."
|
||||||
self.check_webhook("story_update_add_epic", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_add_epic", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_epic_removed(self) -> None:
|
def test_story_epic_removed(self) -> None:
|
||||||
expected_message = "The story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was removed from the epic **Release 1.9**."
|
expected_message = "The story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was removed from the epic **Release 1.9**."
|
||||||
self.check_webhook("story_update_remove_epic", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_remove_epic", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_estimate_changed(self) -> None:
|
def test_story_estimate_changed(self) -> None:
|
||||||
expected_message = "The estimate for the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was set to 4 points."
|
expected_message = "The estimate for the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was set to 4 points."
|
||||||
self.check_webhook("story_update_change_estimate", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_change_estimate", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_estimate_added(self) -> None:
|
def test_story_estimate_added(self) -> None:
|
||||||
expected_message = "The estimate for the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was set to 4 points."
|
expected_message = "The estimate for the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was set to 4 points."
|
||||||
self.check_webhook("story_update_add_estimate", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_add_estimate", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_estimate_removed(self) -> None:
|
def test_story_estimate_removed(self) -> None:
|
||||||
expected_message = "The estimate for the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was set to *Unestimated*."
|
expected_message = "The estimate for the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was set to *Unestimated*."
|
||||||
self.check_webhook("story_update_remove_estimate", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_remove_estimate", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_file_attachment_added(self) -> None:
|
def test_story_file_attachment_added(self) -> None:
|
||||||
expected_message = "A file attachment `zuliprc` was added to the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11)."
|
expected_message = "A file attachment `zuliprc` was added to the story [Add cool feature!](https://app.shortcut.com/zulip/story/11)."
|
||||||
self.check_webhook("story_update_add_attachment", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_add_attachment", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_file_attachment_removed_ignore(
|
def test_story_file_attachment_removed_ignore(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -169,20 +170,20 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
|
|
||||||
def test_story_label_added(self) -> None:
|
def test_story_label_added(self) -> None:
|
||||||
expected_message = "The label **mockup** was added to the story [An epic story!](https://app.clubhouse.io/zulip/story/23)."
|
expected_message = "The label **mockup** was added to the story [An epic story!](https://app.shortcut.com/zulip/story/23)."
|
||||||
self.check_webhook("story_update_add_label", "An epic story!", expected_message)
|
self.check_webhook("story_update_add_label", "An epic story!", expected_message)
|
||||||
|
|
||||||
def test_story_label_multiple_added(self) -> None:
|
def test_story_label_multiple_added(self) -> None:
|
||||||
expected_message = "The labels **mockup**, **label** were added to the story [An epic story!](https://app.clubhouse.io/zulip/story/23)."
|
expected_message = "The labels **mockup**, **label** were added to the story [An epic story!](https://app.shortcut.com/zulip/story/23)."
|
||||||
self.check_webhook("story_update_add_multiple_labels", "An epic story!", expected_message)
|
self.check_webhook("story_update_add_multiple_labels", "An epic story!", expected_message)
|
||||||
|
|
||||||
def test_story_label_added_label_name_in_actions(self) -> None:
|
def test_story_label_added_label_name_in_actions(self) -> None:
|
||||||
expected_message = "The label **sad** was added to the story [An emotional story!](https://app.clubhouse.io/zulip/story/28)."
|
expected_message = "The label **sad** was added to the story [An emotional story!](https://app.shortcut.com/zulip/story/28)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_label_name_in_action", "An emotional story!", expected_message
|
"story_update_add_label_name_in_action", "An emotional story!", expected_message
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_label_removed_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
def test_story_label_removed_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||||
payload = self.get_body("story_update_remove_label")
|
payload = self.get_body("story_update_remove_label")
|
||||||
result = self.client_post(self.url, payload, content_type="application/json")
|
result = self.client_post(self.url, payload, content_type="application/json")
|
||||||
|
@ -190,15 +191,15 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
|
|
||||||
def test_story_update_project(self) -> None:
|
def test_story_update_project(self) -> None:
|
||||||
expected_message = "The story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was moved from the **Backend** project to **Devops**."
|
expected_message = "The story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was moved from the **Backend** project to **Devops**."
|
||||||
self.check_webhook("story_update_change_project", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_change_project", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_update_type(self) -> None:
|
def test_story_update_type(self) -> None:
|
||||||
expected_message = "The type of the story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) was changed from **feature** to **bug**."
|
expected_message = "The type of the story [Add cool feature!](https://app.shortcut.com/zulip/story/11) was changed from **feature** to **bug**."
|
||||||
self.check_webhook("story_update_change_type", "Add cool feature!", expected_message)
|
self.check_webhook("story_update_change_type", "Add cool feature!", expected_message)
|
||||||
|
|
||||||
def test_story_update_add_github_pull_request(self) -> None:
|
def test_story_update_add_github_pull_request(self) -> None:
|
||||||
expected_message = "New GitHub PR [#10](https://github.com/eeshangarg/Scheduler/pull/10) opened for story [Testing pull requests with Story](https://app.clubhouse.io/zulip/story/28) (Unscheduled -> Ready for Review)."
|
expected_message = "New GitHub PR [#10](https://github.com/eeshangarg/Scheduler/pull/10) opened for story [Testing pull requests with Story](https://app.shortcut.com/zulip/story/28) (Unscheduled -> Ready for Review)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_github_pull_request",
|
"story_update_add_github_pull_request",
|
||||||
"Testing pull requests with Story",
|
"Testing pull requests with Story",
|
||||||
|
@ -206,14 +207,14 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_story_update_add_github_pull_request_without_workflow_state(self) -> None:
|
def test_story_update_add_github_pull_request_without_workflow_state(self) -> None:
|
||||||
expected_message = "New GitHub PR [#10](https://github.com/eeshangarg/Scheduler/pull/10) opened for story [Testing pull requests with Story](https://app.clubhouse.io/zulip/story/28)."
|
expected_message = "New GitHub PR [#10](https://github.com/eeshangarg/Scheduler/pull/10) opened for story [Testing pull requests with Story](https://app.shortcut.com/zulip/story/28)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_github_pull_request_without_workflow_state",
|
"story_update_add_github_pull_request_without_workflow_state",
|
||||||
"Testing pull requests with Story",
|
"Testing pull requests with Story",
|
||||||
expected_message,
|
expected_message,
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_add_github_multiple_pull_requests(
|
def test_story_update_add_github_multiple_pull_requests(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -230,7 +231,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"Story1",
|
"Story1",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="Story1", url="https://app.clubhouse.io/pig208/story/17"
|
name="Story1", url="https://app.shortcut.com/pig208/story/17"
|
||||||
),
|
),
|
||||||
"pull-request_create",
|
"pull-request_create",
|
||||||
),
|
),
|
||||||
|
@ -239,7 +240,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"Story2",
|
"Story2",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="Story2", url="https://app.clubhouse.io/pig208/story/18"
|
name="Story2", url="https://app.shortcut.com/pig208/story/18"
|
||||||
),
|
),
|
||||||
"pull-request_create",
|
"pull-request_create",
|
||||||
),
|
),
|
||||||
|
@ -247,14 +248,14 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
||||||
|
|
||||||
def test_story_update_add_github_pull_request_with_comment(self) -> None:
|
def test_story_update_add_github_pull_request_with_comment(self) -> None:
|
||||||
expected_message = "Existing GitHub PR [#2](https://github.com/PIG208/test-clubhouse/pull/2) associated with story [asd2](https://app.clubhouse.io/pig208/story/15)."
|
expected_message = "Existing GitHub PR [#2](https://github.com/PIG208/test-clubhouse/pull/2) associated with story [asd2](https://app.shortcut.com/pig208/story/15)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_github_pull_request_with_comment",
|
"story_update_add_github_pull_request_with_comment",
|
||||||
"asd2",
|
"asd2",
|
||||||
expected_message,
|
expected_message,
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_add_github_multiple_pull_requests_with_comment(
|
def test_story_update_add_github_multiple_pull_requests_with_comment(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -271,7 +272,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new1",
|
"new1",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new1", url="https://app.clubhouse.io/pig208/story/26"
|
name="new1", url="https://app.shortcut.com/pig208/story/26"
|
||||||
),
|
),
|
||||||
"pull-request_comment",
|
"pull-request_comment",
|
||||||
),
|
),
|
||||||
|
@ -280,7 +281,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new2",
|
"new2",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new2", url="https://app.clubhouse.io/pig208/story/27"
|
name="new2", url="https://app.shortcut.com/pig208/story/27"
|
||||||
),
|
),
|
||||||
"pull-request_comment",
|
"pull-request_comment",
|
||||||
),
|
),
|
||||||
|
@ -288,12 +289,12 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
||||||
|
|
||||||
def test_story_update_add_github_branch(self) -> None:
|
def test_story_update_add_github_branch(self) -> None:
|
||||||
expected_message = "New GitHub branch [eeshangarg/ch27/testing-pull-requests-with-story](https://github.com/eeshangarg/scheduler/tree/eeshangarg/ch27/testing-pull-requests-with-story) associated with story [Testing pull requests with Story](https://app.clubhouse.io/zulip/story/27) (Unscheduled -> In Development)."
|
expected_message = "New GitHub branch [eeshangarg/ch27/testing-pull-requests-with-story](https://github.com/eeshangarg/scheduler/tree/eeshangarg/ch27/testing-pull-requests-with-story) associated with story [Testing pull requests with Story](https://app.shortcut.com/zulip/story/27) (Unscheduled -> In Development)."
|
||||||
self.check_webhook(
|
self.check_webhook(
|
||||||
"story_update_add_github_branch", "Testing pull requests with Story", expected_message
|
"story_update_add_github_branch", "Testing pull requests with Story", expected_message
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_batch(self, check_send_webhook_message_mock: MagicMock) -> None:
|
def test_story_update_batch(self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||||
payload = self.get_body("story_update_everything_at_once")
|
payload = self.get_body("story_update_everything_at_once")
|
||||||
self.client_post(self.url, payload, content_type="application/json")
|
self.client_post(self.url, payload, content_type="application/json")
|
||||||
|
@ -308,7 +309,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"asd4",
|
"asd4",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="asd4", url="https://app.clubhouse.io/pig208/story/17"
|
name="asd4", url="https://app.shortcut.com/pig208/story/17"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
|
@ -317,7 +318,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new1",
|
"new1",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new1", url="https://app.clubhouse.io/pig208/story/26"
|
name="new1", url="https://app.shortcut.com/pig208/story/26"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
|
@ -326,14 +327,14 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new2",
|
"new2",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new2", url="https://app.clubhouse.io/pig208/story/27"
|
name="new2", url="https://app.shortcut.com/pig208/story/27"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_batch_skip_removed_labels(
|
def test_story_update_batch_skip_removed_labels(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -350,7 +351,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"asd4",
|
"asd4",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="asd4", url="https://app.clubhouse.io/pig208/story/17"
|
name="asd4", url="https://app.shortcut.com/pig208/story/17"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
|
@ -359,7 +360,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new1",
|
"new1",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new1", url="https://app.clubhouse.io/pig208/story/26"
|
name="new1", url="https://app.shortcut.com/pig208/story/26"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
|
@ -368,14 +369,14 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
user_profile,
|
user_profile,
|
||||||
"new2",
|
"new2",
|
||||||
expected_message.format(
|
expected_message.format(
|
||||||
name="new2", url="https://app.clubhouse.io/pig208/story/27"
|
name="new2", url="https://app.shortcut.com/pig208/story/27"
|
||||||
),
|
),
|
||||||
"story_update_batch",
|
"story_update_batch",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_batch_each_with_one_change(
|
def test_story_update_batch_each_with_one_change(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -384,23 +385,23 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
expected_messages = [
|
expected_messages = [
|
||||||
(
|
(
|
||||||
"asd4",
|
"asd4",
|
||||||
"The type of the story [asd4](https://app.clubhouse.io/pig208/story/17) was changed from **feature** to **bug**.",
|
"The type of the story [asd4](https://app.shortcut.com/pig208/story/17) was changed from **feature** to **bug**.",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"new1",
|
"new1",
|
||||||
"The story [new1](https://app.clubhouse.io/pig208/story/26) was moved from **epic** to **testeipc**.",
|
"The story [new1](https://app.shortcut.com/pig208/story/26) was moved from **epic** to **testeipc**.",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"new2",
|
"new2",
|
||||||
"The label **low priority** was added to the story [new2](https://app.clubhouse.io/pig208/story/27).",
|
"The label **low priority** was added to the story [new2](https://app.shortcut.com/pig208/story/27).",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"new3",
|
"new3",
|
||||||
"State of the story [new3](https://app.clubhouse.io/pig208/story/28) was changed from **In Development** to **Ready for Review**.",
|
"State of the story [new3](https://app.shortcut.com/pig208/story/28) was changed from **In Development** to **Ready for Review**.",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"new4",
|
"new4",
|
||||||
"The story [new4](https://app.clubhouse.io/pig208/story/29) was moved from the **Product Development** project to **test2**.",
|
"The story [new4](https://app.shortcut.com/pig208/story/29) was moved from the **Product Development** project to **test2**.",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
request, user_profile = (
|
request, user_profile = (
|
||||||
|
@ -419,7 +420,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
]
|
]
|
||||||
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
self.assertEqual(check_send_webhook_message_mock.call_args_list, expected_list)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_update_batch_not_supported_ignore(
|
def test_story_update_batch_not_supported_ignore(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -428,7 +429,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assertFalse(check_send_webhook_message_mock.called)
|
self.assertFalse(check_send_webhook_message_mock.called)
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_empty_post_request_body_ignore(
|
def test_empty_post_request_body_ignore(
|
||||||
self, check_send_webhook_message_mock: MagicMock
|
self, check_send_webhook_message_mock: MagicMock
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -437,7 +438,7 @@ class ClubhouseWebhookTest(WebhookTestCase):
|
||||||
self.assertFalse(check_send_webhook_message_mock.called)
|
self.assertFalse(check_send_webhook_message_mock.called)
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
|
|
||||||
@patch("zerver.webhooks.clubhouse.view.check_send_webhook_message")
|
@patch("zerver.webhooks.shortcut.view.check_send_webhook_message")
|
||||||
def test_story_comment_updated_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
def test_story_comment_updated_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||||
payload = self.get_body("story_comment_updated")
|
payload = self.get_body("story_comment_updated")
|
||||||
result = self.client_post(self.url, payload, content_type="application/json")
|
result = self.client_post(self.url, payload, content_type="application/json")
|
|
@ -755,15 +755,15 @@ EVENTS_SECONDARY_ACTIONS_FUNCTION_MAPPER: dict[str, Callable[[WildValue], Iterat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@webhook_view("Clubhouse", all_event_types=ALL_EVENT_TYPES)
|
@webhook_view("Shortcut", all_event_types=ALL_EVENT_TYPES)
|
||||||
@typed_endpoint
|
@typed_endpoint
|
||||||
def api_clubhouse_webhook(
|
def api_shortcut_webhook(
|
||||||
request: HttpRequest,
|
request: HttpRequest,
|
||||||
user_profile: UserProfile,
|
user_profile: UserProfile,
|
||||||
*,
|
*,
|
||||||
payload: JsonBodyPayload[WildValue],
|
payload: JsonBodyPayload[WildValue],
|
||||||
) -> HttpResponse:
|
) -> HttpResponse:
|
||||||
# Clubhouse has a tendency to send empty POST requests to
|
# Shortcut has a tendency to send empty POST requests to
|
||||||
# third-party endpoints. It is unclear as to which event type
|
# third-party endpoints. It is unclear as to which event type
|
||||||
# such requests correspond to. So, it is best to ignore such
|
# such requests correspond to. So, it is best to ignore such
|
||||||
# requests for now.
|
# requests for now.
|