Skip to content

Support parsing PR comment events for Bitbucket Cloud #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
331 changes: 331 additions & 0 deletions scm/driver/bitbucket/testdata/webhooks/pr_comment_created.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,331 @@
{
"comment": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/comments/311512047"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba/pull-requests/1/_/diff#comment-311512047"
}
},
"deleted": false,
"pullrequest": {
"type": "pullrequest",
"id": 1,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba/pull-requests/1"
}
},
"title": "Update pom.xml"
},
"content": {
"raw": "test comment",
"markup": "markdown",
"html": "<p>test comment</p>",
"type": "rendered"
},
"created_on": "2022-06-23T22:10:09.939925+00:00",
"user": {
"display_name": "Rutvij Mehta",
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D"
},
"html": {
"href": "https://bitbucket.org/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/1bf4d1258f18330b314d2737db430cb0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRM-5.png"
}
},
"type": "user",
"nickname": "Rutvij Mehta",
"account_id": "624de6f6fd5e450070486936"
},
"updated_on": "2022-06-23T22:10:09.939978+00:00",
"type": "pullrequest_comment",
"id": 311512047
},
"pullrequest": {
"rendered": {
"description": {
"raw": "Test",
"markup": "markdown",
"html": "<p>Test</p>",
"type": "rendered"
},
"title": {
"raw": "Update pom.xml",
"markup": "markdown",
"html": "<p>Update pom.xml</p>",
"type": "rendered"
}
},
"type": "pullrequest",
"description": "Test",
"links": {
"decline": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/decline"
},
"diffstat": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/diffstat/rutvijmehta-harness/spring-cloud-alibaba:b9437f32dddd%0Dcfd2d864e389?from_pullrequest_id=1&topic=true"
},
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/commits"
},
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1"
},
"comments": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/comments"
},
"merge": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/merge"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba/pull-requests/1"
},
"activity": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/activity"
},
"request-changes": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/request-changes"
},
"diff": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/diff/rutvijmehta-harness/spring-cloud-alibaba:b9437f32dddd%0Dcfd2d864e389?from_pullrequest_id=1&topic=true"
},
"approve": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/approve"
},
"statuses": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/pullrequests/1/statuses"
}
},
"title": "Update pom.xml",
"close_source_branch": false,
"reviewers": [],
"id": 1,
"destination": {
"commit": {
"hash": "cfd2d864e389",
"type": "commit",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/commit/cfd2d864e389"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba/commits/cfd2d864e389"
}
}
},
"repository": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B4402cbae-7790-453a-b29e-5fcab61a84df%7D?ts=default"
}
},
"type": "repository",
"name": "spring-cloud-alibaba",
"full_name": "rutvijmehta-harness/spring-cloud-alibaba",
"uuid": "{4402cbae-7790-453a-b29e-5fcab61a84df}"
},
"branch": {
"name": "2021.x"
}
},
"created_on": "2022-06-23T19:27:25.443049+00:00",
"summary": {
"raw": "Test",
"markup": "markdown",
"html": "<p>Test</p>",
"type": "rendered"
},
"source": {
"commit": {
"hash": "b9437f32dddd",
"type": "commit",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba/commit/b9437f32dddd"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba/commits/b9437f32dddd"
}
}
},
"repository": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B4402cbae-7790-453a-b29e-5fcab61a84df%7D?ts=default"
}
},
"type": "repository",
"name": "spring-cloud-alibaba",
"full_name": "rutvijmehta-harness/spring-cloud-alibaba",
"uuid": "{4402cbae-7790-453a-b29e-5fcab61a84df}"
},
"branch": {
"name": "tiwhitepaper-rutvij"
}
},
"comment_count": 1,
"state": "OPEN",
"task_count": 0,
"participants": [
{
"participated_on": "2022-06-23T22:10:09.939978+00:00",
"state": null,
"role": "PARTICIPANT",
"user": {
"display_name": "Rutvij Mehta",
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D"
},
"html": {
"href": "https://bitbucket.org/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/1bf4d1258f18330b314d2737db430cb0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRM-5.png"
}
},
"type": "user",
"nickname": "Rutvij Mehta",
"account_id": "624de6f6fd5e450070486936"
},
"type": "participant",
"approved": false
}
],
"reason": "",
"updated_on": "2022-06-23T22:10:09.939978+00:00",
"author": {
"display_name": "Rutvij Mehta",
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D"
},
"html": {
"href": "https://bitbucket.org/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/1bf4d1258f18330b314d2737db430cb0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRM-5.png"
}
},
"type": "user",
"nickname": "Rutvij Mehta",
"account_id": "624de6f6fd5e450070486936"
},
"merge_commit": null,
"closed_by": null
},
"repository": {
"scm": "git",
"website": null,
"uuid": "{4402cbae-7790-453a-b29e-5fcab61a84df}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/rutvijmehta-harness/spring-cloud-alibaba"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/spring-cloud-alibaba"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B4402cbae-7790-453a-b29e-5fcab61a84df%7D?ts=default"
}
},
"project": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/rutvijmehta-harness/projects/TEST"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/workspace/projects/TEST"
},
"avatar": {
"href": "https://bitbucket.org/account/user/rutvijmehta-harness/projects/TEST/avatar/32?ts=1655023274"
}
},
"type": "project",
"name": "Test",
"key": "TEST",
"uuid": "{aa857cae-daad-4fbd-93ef-503cc3d6c3d6}"
},
"full_name": "rutvijmehta-harness/spring-cloud-alibaba",
"owner": {
"display_name": "Rutvij Mehta",
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D"
},
"html": {
"href": "https://bitbucket.org/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/1bf4d1258f18330b314d2737db430cb0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRM-5.png"
}
},
"type": "user",
"nickname": "Rutvij Mehta",
"account_id": "624de6f6fd5e450070486936"
},
"workspace": {
"slug": "rutvijmehta-harness",
"type": "workspace",
"name": "Rutvij Mehta",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/rutvijmehta-harness"
},
"html": {
"href": "https://bitbucket.org/rutvijmehta-harness/"
},
"avatar": {
"href": "https://bitbucket.org/workspaces/rutvijmehta-harness/avatar/?ts=1655023237"
}
},
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}"
},
"type": "repository",
"is_private": false,
"name": "spring-cloud-alibaba"
},
"actor": {
"display_name": "Rutvij Mehta",
"uuid": "{145a94da-035e-42d6-bf85-296cea8005ba}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D"
},
"html": {
"href": "https://bitbucket.org/%7B145a94da-035e-42d6-bf85-296cea8005ba%7D/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/1bf4d1258f18330b314d2737db430cb0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRM-5.png"
}
},
"type": "user",
"nickname": "Rutvij Mehta",
"account_id": "624de6f6fd5e450070486936"
}
}
Loading