-
-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Set comment as Markdown, Getting comments from API instead of f…
…iltering from activities
- Loading branch information
Showing
6 changed files
with
172 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 63 additions & 85 deletions
148
source/platforms/_tests/fixtures/bitbucket_cloud_comments.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,87 @@ | ||
[ | ||
{ | ||
"comment": { | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324/comments/106400843" | ||
}, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324/_/diff#comment-106400843" } | ||
}, | ||
"deleted": false, | ||
"pullrequest": { | ||
"type": "pullrequest", | ||
"id": 324, | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324" }, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324" } | ||
}, | ||
"title": "Test PR Title" | ||
}, | ||
"content": { | ||
"raw": "⚠️ 1 Warning. Don't worry, everything is fixable.\n\n| | 1 Warning |\n|---|---|\n| ⚠️ | Couldn't find any related issue |\n\n| | 1 Message |\n|---|---|\n| ✨ | Rerun Danger https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007 |\n\n\n\nGenerated by [Danger](https://danger.systems/ \"generated_by_danger\")\n", | ||
"markup": "markdown", | ||
"html": "<p>⚠️ 1 Warning. Don't worry, everything is fixable.</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>1 Warning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>⚠️</td>\n<td>Couldn't find any related issue</td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>1 Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✨</td>\n<td>Rerun Danger <a href=\"https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007\" rel=\"nofollow\" class=\"ap-connect-link\">https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007</a></td>\n</tr>\n</tbody>\n</table>\n<p>Generated by <a data-is-external-link=\"true\" href=\"https://danger.systems/\" rel=\"nofollow\" title=\"generated_by_danger\">Danger</a></p>", | ||
"type": "rendered" | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324/comments/106400843" | ||
}, | ||
"created_on": "2019-06-20T04:53:23.618489+00:00", | ||
"user": { | ||
"display_name": "DangerCI", | ||
"uuid": "{b582acac-f2c2-47a8-a29b-e4c01c5274ab}", | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/users/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D" }, | ||
"html": { "href": "https://bitbucket.org/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D/" }, | ||
"avatar": { | ||
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b3b3d9c50b3772e6bbda9f8/1a7a3e0f-84d7-4948-b107-77b744b4d1c6/128" | ||
} | ||
}, | ||
"nickname": "DangerCI", | ||
"type": "user", | ||
"account_id": "5b3b3d9c50b3772e6bbda9f8" | ||
}, | ||
"updated_on": "2019-06-20T04:53:23.680568+00:00", | ||
"type": "pullrequest_comment", | ||
"id": 106400843 | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324/_/diff#comment-106400843" } | ||
}, | ||
"pull_request": { | ||
"deleted": false, | ||
"pullrequest": { | ||
"type": "pullrequest", | ||
"id": 324, | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324" }, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324" } | ||
}, | ||
"title": "Test PR Title" | ||
} | ||
}, | ||
{ | ||
"comment": { | ||
}, | ||
"content": { | ||
"raw": "⚠️ 1 Warning. Don't worry, everything is fixable.\n\n| | 1 Warning |\n|---|---|\n| ⚠️ | Couldn't find any related issue |\n\n| | 1 Message |\n|---|---|\n| ✨ | Rerun Danger https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007 |\n\n\n\nGenerated by [Danger](https://danger.systems/ \"generated_by_danger\")\n", | ||
"markup": "markdown", | ||
"html": "<p>⚠️ 1 Warning. Don't worry, everything is fixable.</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>1 Warning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>⚠️</td>\n<td>Couldn't find any related issue</td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>1 Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✨</td>\n<td>Rerun Danger <a href=\"https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007\" rel=\"nofollow\" class=\"ap-connect-link\">https://bitbucket.org/foo/bar/addon/pipelines/home#!/results/1007</a></td>\n</tr>\n</tbody>\n</table>\n<p>Generated by <a data-is-external-link=\"true\" href=\"https://danger.systems/\" rel=\"nofollow\" title=\"generated_by_danger\">Danger</a></p>", | ||
"type": "rendered" | ||
}, | ||
"created_on": "2019-06-20T04:53:23.618489+00:00", | ||
"user": { | ||
"display_name": "DangerCI", | ||
"uuid": "{b582acac-f2c2-47a8-a29b-e4c01c5274ab}", | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324/comments/106174425" | ||
}, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324/_/diff#comment-106174425" } | ||
}, | ||
"deleted": false, | ||
"pullrequest": { | ||
"type": "pullrequest", | ||
"id": 324, | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324" }, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324" } | ||
}, | ||
"title": "Test PR Title" | ||
"self": { "href": "https://api.bitbucket.org/2.0/users/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D" }, | ||
"html": { "href": "https://bitbucket.org/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D/" }, | ||
"avatar": { | ||
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b3b3d9c50b3772e6bbda9f8/1a7a3e0f-84d7-4948-b107-77b744b4d1c6/128" | ||
} | ||
}, | ||
"content": { | ||
"raw": "remove this file", | ||
"markup": "markdown", | ||
"html": "<p>remove this file</p>", | ||
"type": "rendered" | ||
}, | ||
"created_on": "2019-06-18T18:23:19.626793+00:00", | ||
"user": { | ||
"display_name": "DangerCI", | ||
"uuid": "{b582acac-f2c2-47a8-a29b-e4c01c5274ab}", | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/users/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D" }, | ||
"html": { "href": "https://bitbucket.org/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D/" }, | ||
"avatar": { | ||
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b3b3d9c50b3772e6bbda9f8/1a7a3e0f-84d7-4948-b107-77b744b4d1c6/128" | ||
} | ||
}, | ||
"nickname": "DangerCI", | ||
"type": "user", | ||
"account_id": "5b3b3d9c50b3772e6bbda9f8" | ||
"nickname": "DangerCI", | ||
"type": "user", | ||
"account_id": "5b3b3d9c50b3772e6bbda9f8" | ||
}, | ||
"updated_on": "2019-06-20T04:53:23.680568+00:00", | ||
"type": "pullrequest_comment", | ||
"id": 106400843 | ||
}, | ||
{ | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324/comments/106174425" | ||
}, | ||
"inline": {}, | ||
"updated_on": "2019-06-18T18:23:19.636448+00:00", | ||
"type": "pullrequest_comment", | ||
"id": 106174425 | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324/_/diff#comment-106174425" } | ||
}, | ||
"pull_request": { | ||
"deleted": false, | ||
"pullrequest": { | ||
"type": "pullrequest", | ||
"id": 324, | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/repositories/foo/bar/pullrequests/324" }, | ||
"html": { "href": "https://bitbucket.org/foo/bar/pull-requests/324" } | ||
}, | ||
"title": "Test PR Title" | ||
} | ||
}, | ||
"content": { | ||
"raw": "remove this file", | ||
"markup": "markdown", | ||
"html": "<p>remove this file</p>", | ||
"type": "rendered" | ||
}, | ||
"created_on": "2019-06-18T18:23:19.626793+00:00", | ||
"user": { | ||
"display_name": "DangerCI", | ||
"uuid": "{b582acac-f2c2-47a8-a29b-e4c01c5274ab}", | ||
"links": { | ||
"self": { "href": "https://api.bitbucket.org/2.0/users/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D" }, | ||
"html": { "href": "https://bitbucket.org/%7Bb582acac-f2c2-47a8-a29b-e4c01c5274ab%7D/" }, | ||
"avatar": { | ||
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b3b3d9c50b3772e6bbda9f8/1a7a3e0f-84d7-4948-b107-77b744b4d1c6/128" | ||
} | ||
}, | ||
"nickname": "DangerCI", | ||
"type": "user", | ||
"account_id": "5b3b3d9c50b3772e6bbda9f8" | ||
}, | ||
"inline": {}, | ||
"updated_on": "2019-06-18T18:23:19.636448+00:00", | ||
"type": "pullrequest_comment", | ||
"id": 106174425 | ||
} | ||
] |
Oops, something went wrong.