Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/jira: Remove support for deprecated comment events.
Niloth Pbffa7ca1ca23
diff --git a/zerver/webhooks/jira/fixtures/comment_deleted_v2.json b/zerver/webhooks/jira/fixtures/comment_deleted_v2.jsondeleted file mode 100644index 0c40f1af828..00000000000--- a/zerver/webhooks/jira/fixtures/comment_deleted_v2.json+++ /dev/null@@ -1,244 +0,0 @@-{- "timestamp":1483464729046,- "webhookEvent":"jira:issue_updated",- "issue_event_type_name":"issue_comment_deleted",- "user":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "issue":{- "id":"10000",- "self":"https://zuliptomek.atlassian.net/rest/api/2/issue/10000",- "key":"TOM-1",- "fields":{- "issuetype":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/issuetype/10100",- "id":"10100",- "description":"A user story. Created by JIRA Software - do not edit or delete.",- "iconUrl":"https://zuliptomek.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10315&avatarType=issuetype",- "name":"Story",- "subtask":false,- "avatarId":10315- },- "timespent":null,- "project":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/project/10000",- "id":"10000",- "key":"TOM",- "name":"tomek",- "avatarUrls":{- "48x48":"https://zuliptomek.atlassian.net/secure/projectavatar?avatarId=10324",- "24x24":"https://zuliptomek.atlassian.net/secure/projectavatar?size=small&avatarId=10324",- "16x16":"https://zuliptomek.atlassian.net/secure/projectavatar?size=xsmall&avatarId=10324",- "32x32":"https://zuliptomek.atlassian.net/secure/projectavatar?size=medium&avatarId=10324"- }- },- "fixVersions":[-- ],- "customfield_10110":null,- "customfield_10111":null,- "aggregatetimespent":null,- "resolution":null,- "customfield_10112":null,- "customfield_10113":"Not started",- "customfield_10114":null,- "customfield_10104":null,- "customfield_10105":null,- "customfield_10106":null,- "customfield_10107":null,- "customfield_10108":null,- "customfield_10109":null,- "resolutiondate":null,- "workratio":-1,- "lastViewed":"2017-01-03T18:32:08.990+0100",- "watches":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/issue/TOM-1/watchers",- "watchCount":1,- "isWatching":true- },- "created":"2016-12-31T15:08:29.213+0100",- "priority":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/priority/1",- "iconUrl":"https://zuliptomek.atlassian.net/images/icons/priorities/highest.svg",- "name":"Highest",- "id":"1"- },- "customfield_10100":null,- "customfield_10101":null,- "customfield_10102":null,- "labels":[-- ],- "customfield_10103":null,- "timeestimate":null,- "aggregatetimeoriginalestimate":null,- "versions":[-- ],- "issuelinks":[-- ],- "assignee":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "updated":"2017-01-03T18:32:09.035+0100",- "status":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/status/3",- "description":"This issue is being actively worked on at the moment by the assignee.",- "iconUrl":"https://zuliptomek.atlassian.net/images/icons/statuses/inprogress.png",- "name":"In Progress",- "id":"3",- "statusCategory":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/statuscategory/4",- "id":4,- "key":"indeterminate",- "colorName":"yellow",- "name":"In Progress"- }- },- "components":[-- ],- "timeoriginalestimate":null,- "description":"description",- "timetracking":{-- },- "customfield_10005":null,- "attachment":[-- ],- "aggregatetimeestimate":null,- "summary":"New Issue",- "creator":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "subtasks":[-- ],- "reporter":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "customfield_10000":"{}",- "aggregateprogress":{- "progress":0,- "total":0- },- "customfield_10001":null,- "customfield_10115":null,- "customfield_10116":"0|hzzzzz:",- "customfield_10117":null,- "environment":null,- "duedate":null,- "progress":{- "progress":0,- "total":0- },- "comment":{- "comments":[- {- "self":"https://zuliptomek.atlassian.net/rest/api/2/issue/10000/comment/10000",- "id":"10000",- "author":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "body":"Tomek",- "updateAuthor":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/user?username=admin",- "name":"admin",- "key":"admin",- "emailAddress":"[email protected]",- "avatarUrls":{- "48x48":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=48",- "24x24":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=24",- "16x16":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=16",- "32x32":"https://secure.gravatar.com/avatar/29cc55c8d02bff270b590900c6796ff1?d=mm&s=32"- },- "displayName":"Tomasz Kolek",- "active":true,- "timeZone":"Europe/Berlin"- },- "created":"2017-01-02T18:14:50.475+0100",- "updated":"2017-01-02T18:14:50.475+0100"- }- ],- "maxResults":1,- "total":1,- "startAt":0- },- "votes":{- "self":"https://zuliptomek.atlassian.net/rest/api/2/issue/TOM-1/votes",- "votes":0,- "hasVoted":false- },- "worklog":{- "startAt":0,- "maxResults":20,- "total":0,- "worklogs":[-- ]- }- }- }-}diff --git a/zerver/webhooks/jira/fixtures/comment_edited_v2.json b/zerver/webhooks/jira/fixtures/comment_edited_v2.jsondeleted file mode 100644index ab1a52a37ed..00000000000--- a/zerver/webhooks/jira/fixtures/comment_edited_v2.json+++ /dev/null@@ -1,190 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "issue_event_type_name":"issue_comment_edited",- "timestamp": 1364403934253,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }-}diff --git a/zerver/webhooks/jira/fixtures/commented_markup_v2.json b/zerver/webhooks/jira/fixtures/commented_markup_v2.jsondeleted file mode 100644index 74742d6604f..00000000000--- a/zerver/webhooks/jira/fixtures/commented_markup_v2.json+++ /dev/null@@ -1,276 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "issue_event_type_name":"issue_commented",- "user": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "issue": {- "id": "10100",- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100",- "key": "TEST-7",- "fields": {- "summary": "Testing of rich text",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "https://zulipp.atlassian.net/rest/api/2/issuetype/2",- "id": "2",- "description": "A new feature of the product, which has yet to be developed.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/issuetypes/newfeature.png",- "name": "New Feature",- "subtask": false- },- "timespent": null,- "reporter": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:08:48.446-0400",- "updated": "2013-10-01T16:16:47.821-0400",- "priority": {- "self": "https://zulipp.atlassian.net/rest/api/2/priority/3",- "iconUrl": "https://zulipp.atlassian.net/images/icons/priorities/major.png",- "name": "Major",- "id": "3"- },- "description": "h1. So this is a heading\r\n\r\nAnd some *bold* **and _bold_?\r\n\r\n{quote}\r\nsome stuff goes here\r\n{quote}",- "customfield_10001": null,- "customfield_10002": null,- "customfield_10003": null,- "issuelinks": [],- "customfield_10000": null,- "subtasks": [],- "customfield_10008": null,- "customfield_10007": null,- "status": {- "self": "https://zulipp.atlassian.net/rest/api/2/status/10001",- "description": "",- "iconUrl": "https://zulipp.atlassian.net/images/icons/statuses/open.png",- "name": "To Do",- "id": "10001"- },- "customfield_10006": "7",- "labels": [],- "workratio": -1,- "project": {- "self": "https://zulipp.atlassian.net/rest/api/2/project/10000",- "id": "10000",- "key": "TEST",- "name": "TestProject",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",- "24x24": "https://zulipp.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "32x32": "https://zulipp.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011",- "48x48": "https://zulipp.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "environment": null,- "customfield_10014": null,- "customfield_10015": null,- "lastViewed": "2013-10-01T16:16:48.075-0400",- "aggregateprogress": {- "progress": 0,- "total": 0- },- "customfield_10012": null,- "components": [],- "customfield_10013": null,- "comment": {- "startAt": 0,- "maxResults": 3,- "total": 3,- "comments": [- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10000",- "id": "10000",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "Commenting that *this is important* and also _please italicize me_\r\n\r\nh2. Heading this all the way\r\n\r\nsome quote:\r\n\r\n{quote}\r\noh say can you see...\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:11:07.615-0400",- "updated": "2013-10-01T16:11:07.615-0400"- },- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10001",- "id": "10001",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "*Rich Text* comment, with _italicized_ text,\r\n\r\nand including some\r\n\r\n{quote}\r\nquotations by yours truly\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:16:47.821-0400",- "updated": "2013-10-01T16:16:47.821-0400"- },- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10002",- "id": "10002",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "This is a comment that likes to *exercise* a lot of _different_ {{conventions}} that {{jira uses}}.\r\n\r\n{noformat}\r\nthis code is not highlighted, but monospaced\r\n{noformat}\r\n\r\n{code:python}\r\ndef python():\r\n print \"likes to be formatted\"\r\n{code}\r\n\r\n[http://www.google.com] is a bare link, and [Google|http://www.google.com] is given a title.\r\n\r\nThanks!\r\n\r\n{quote}\r\nSomeone said somewhere\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T17:03:00.964-0400",- "updated": "2013-10-01T17:03:00.964-0400"- }- ]- },- "timeoriginalestimate": null,- "customfield_10017": null,- "customfield_10016": null,- "customfield_10019": null,- "customfield_10018": null,- "votes": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-7/votes",- "votes": 0,- "hasVoted": false- },- "fixVersions": [],- "resolution": null,- "resolutiondate": null,- "aggregatetimeoriginalestimate": null,- "duedate": null,- "customfield_10020": null,- "customfield_10021": "Not Started",- "watches": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-7/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 20,- "total": 0,- "worklogs": []- },- "assignee": null,- "attachment": [],- "aggregatetimeestimate": null,- "versions": [],- "timeestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10002",- "id": "10002",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "This is a comment that likes to *exercise* a lot of _different_ {{conventions}} that {{jira uses}}.\r\n\r\n{noformat}\r\nthis code is not highlighted, but monospaced\r\n{noformat}\r\n\r\n{code:python}\r\ndef python():\r\n print \"likes to be formatted\"\r\n{code}\r\n\r\n[http://www.google.com] is a bare link, and [Google|http://www.google.com] is given a title.\r\n\r\nThanks!\r\n\r\n{quote}\r\nSomeone said somewhere\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T17:03:00.964-0400",- "updated": "2013-10-01T17:03:00.964-0400"- },- "timestamp": 1380661380969-}diff --git a/zerver/webhooks/jira/fixtures/commented_v2.json b/zerver/webhooks/jira/fixtures/commented_v2.jsondeleted file mode 100644index 96b87398957..00000000000--- a/zerver/webhooks/jira/fixtures/commented_v2.json+++ /dev/null@@ -1,190 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "issue_event_type_name":"issue_commented",- "timestamp": 1364403934253,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }-}diff --git a/zerver/webhooks/jira/fixtures/commented_v2_with_two_full_links.json b/zerver/webhooks/jira/fixtures/commented_v2_with_two_full_links.jsondeleted file mode 100644index b642458502f..00000000000--- a/zerver/webhooks/jira/fixtures/commented_v2_with_two_full_links.json+++ /dev/null@@ -1,190 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "issue_event_type_name":"issue_commented",- "timestamp": 1364403934253,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "This is the [first link|https://google.com] and this is the [second link|https://google.com] and this is the end.",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "This is the [first link|https://google.com] and this is the [second link|https://google.com] and this is the end.",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }-}diff --git a/zerver/webhooks/jira/tests.py b/zerver/webhooks/jira/tests.pyindex a1fdac39b14..069faac88dd 100644--- a/zerver/webhooks/jira/tests.py+++ b/zerver/webhooks/jira/tests.py@@ -77,52 +77,6 @@ Leonardo Franchi [Administrator] created [TEST-4: Test Created Assignee](https:/""".strip()self.check_webhook("created_assignee_v2", expected_topic_name, expected_message)- def test_commented(self) -> None:- expected_topic_name = "BUG-15: New bug with hook"- expected_message = """-Leo Franchi commented on [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15) (assigned to **Othello, the Moor of Venice**):--``` quote-Adding a comment. Oh, what a comment it is!-```-""".strip()- self.check_webhook("commented_v2", expected_topic_name, expected_message)-- def test_commented_with_two_full_links(self) -> None:- expected_topic_name = "BUG-15: New bug with hook"- expected_message = """-Leo Franchi commented on [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15) (assigned to **Othello, the Moor of Venice**):--``` quote-This is the [first link](https://google.com) and this is the [second link](https://google.com) and this is the end.-```-""".strip()- self.check_webhook(- "commented_v2_with_two_full_links", expected_topic_name, expected_message- )-- def test_comment_edited(self) -> None:- expected_topic_name = "BUG-15: New bug with hook"- expected_message = """-Leo Franchi edited a comment on [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15) (assigned to **Othello, the Moor of Venice**):--``` quote-Adding a comment. Oh, what a comment it is!-```-""".strip()- self.check_webhook("comment_edited_v2", expected_topic_name, expected_message)-- def test_comment_deleted(self) -> None:- expected_topic_name = "TOM-1: New Issue"- expected_message = "Tomasz Kolek deleted a comment from [TOM-1: New Issue](https://zuliptomek.atlassian.net/browse/TOM-1) (assigned to **[email protected]**)."- self.check_webhook("comment_deleted_v2", expected_topic_name, expected_message)-- def test_commented_markup(self) -> None:- expected_topic_name = "TEST-7: Testing of rich text"- expected_message = """Leonardo Franchi [Administrator] commented on [TEST-7: Testing of rich text](https://zulipp.atlassian.net/browse/TEST-7):\n\n``` quote\nThis is a comment that likes to **exercise** a lot of _different_ `conventions` that `jira uses`.\r\n\r\n~~~\n\r\nthis code is not highlighted, but monospaced\r\n\n~~~\r\n\r\n~~~\n\r\ndef python():\r\n print "likes to be formatted"\r\n\n~~~\r\n\r\n[http://www.google.com](http://www.google.com) is a bare link, and [Google](http://www.google.com) is given a title.\r\n\r\nThanks!\r\n\r\n~~~ quote\n\r\nSomeone said somewhere\r\n\n~~~\n```"""-- self.check_webhook("commented_markup_v2", expected_topic_name, expected_message)-def test_deleted(self) -> None:expected_topic_name = "BUG-15: New bug with hook"expected_message = "Leo Franchi deleted [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15)."@@ -149,24 +103,24 @@ Adding a comment. Oh, what a comment it is!* Changed status from **To Do** to **In Progress**"""self.check_webhook("change_status_v2", expected_topic_name, expected_message)- def test_comment_event_comment_created(self) -> None:+ def test_comment_created(self) -> None:expected_topic_name = "SP-1: Add support for newer format Jira issue comment events"expected_message = """Hemanth V. Alluri commented on [SP-1: Add support for newer format Jira issue comment events](https://f20171170.atlassian.net/browse/SP-1)\n``` quote\nThis is a comment that likes to **exercise** a lot of _different_ `conventions` that `jira uses`.\r\n\r\n~~~\n\r\nthis code is not highlighted, but monospaced\r\n\n~~~\r\n\r\n~~~\n\r\ndef python():\r\n print "likes to be formatted"\r\n\n~~~\r\n\r\n[http://www.google.com](http://www.google.com) is a bare link, and [Google](http://www.google.com) is given a title.\r\n\r\nThanks!\r\n\r\n~~~ quote\n\r\nSomeone said somewhere\r\n\n~~~!\n```"""self.check_webhook("comment_created", expected_topic_name, expected_message)- def test_comment_event_comment_created_no_issue_details(self) -> None:+ def test_comment_created_no_issue_details(self) -> None:expected_topic_name = "10000: Upgrade Jira to get the issue title here."expected_message = """Hemanth V. Alluri commented on 10000: Upgrade Jira to get the issue title here.\n``` quote\nSounds like it’s pretty important. I’ll get this fixed ASAP!\n```"""self.check_webhook("comment_created_no_issue_details", expected_topic_name, expected_message)- def test_comment_event_comment_edited(self) -> None:+ def test_comment_updated(self) -> None:expected_topic_name = "SP-1: Add support for newer format Jira issue comment events"expected_message = """Hemanth V. Alluri updated their comment on [SP-1: Add support for newer format Jira issue comment events](https://f20171170.atlassian.net/browse/SP-1)\n``` quote\nThis is a very important issue! I’m on it!\n```"""self.check_webhook("comment_updated", expected_topic_name, expected_message)- def test_comment_event_comment_deleted(self) -> None:+ def test_comment_deleted(self) -> None:expected_topic_name = "SP-1: Add support for newer format Jira issue comment events"expected_message = """Hemanth V. Alluri deleted their comment on [SP-1: Add support for newer format Jira issue comment events](https://f20171170.atlassian.net/browse/SP-1)\n``` quote\n~~This is a very important issue! I’m on it!~~\n```"""self.check_webhook("comment_deleted", expected_topic_name, expected_message)diff --git a/zerver/webhooks/jira/view.py b/zerver/webhooks/jira/view.pyindex 7cac25e6d98..03ee8d6b524 100644--- a/zerver/webhooks/jira/view.py+++ b/zerver/webhooks/jira/view.py@@ -200,50 +200,26 @@ def handle_updated_issue_event(payload: WildValue, user_profile: UserProfile) ->else:assignee_blurb = ""- sub_event = payload.get("issue_event_type_name").tame(check_string)- if "comment" in sub_event:- if sub_event == "issue_commented":- verb = "commented on"- elif sub_event == "issue_comment_edited":- verb = "edited a comment on"- else:- verb = "deleted a comment from"-- if payload.get("webhookEvent").tame(check_none_or(check_string)) == "comment_created":- author = payload["comment"]["author"]["displayName"].tame(check_string)- else:- author = get_issue_author(payload)-- content = f"{author} {verb} {issue}{assignee_blurb}"- comment = get_in(payload, ["comment", "body"]).tame(check_string)- if comment:- comment = convert_jira_markup(comment, user_profile.realm)- content = f"{content}:\n\n``` quote\n{comment}\n```"- else:- content = f"{content}."- else:- content = f"{get_issue_author(payload)} updated {issue}{assignee_blurb}:\n\n"- changelog = payload.get("changelog")-- if changelog:- # Use the changelog to display the changes, whitelist types we accept- items = changelog.get("items")- for item in items:- field = item.get("field").tame(check_none_or(check_string))-- if field == "assignee" and assignee_mention != "":- target_field_string = assignee_mention- else:- # Convert a user's target to a @-mention if possible- target_field_string = "**{}**".format(- item.get("toString").tame(check_none_or(check_string))- )-- from_field_string = item.get("fromString").tame(check_none_or(check_string))- if target_field_string or from_field_string:- content = add_change_info(- content, field, from_field_string, target_field_string- )+ content = f"{get_issue_author(payload)} updated {issue}{assignee_blurb}:\n\n"+ changelog = payload.get("changelog")++ if changelog:+ # Use the changelog to display the changes, whitelist types we accept+ items = changelog.get("items")+ for item in items:+ field = item.get("field").tame(check_none_or(check_string))++ if field == "assignee" and assignee_mention != "":+ target_field_string = assignee_mention+ else:+ # Convert a user's target to a @-mention if possible+ target_field_string = "**{}**".format(+ item.get("toString").tame(check_none_or(check_string))+ )++ from_field_string = item.get("fromString").tame(check_none_or(check_string))+ if target_field_string or from_field_string:+ content = add_change_info(content, field, from_field_string, target_field_string)return content