I'm utilizing Bitbucket Server's REST API 1.0 to grab all activities on a pull request using the following endpoint: /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities
.
My issue is that I'm unable to grab all of the threaded comments. Currently, I'm checking if a user has commented by grabbing the action
key and seeing if it has a value of COMMMENTED
. However, if there is a threaded comment then the parent comment has a comments
array. If that threaded comment also has a threaded comment then there is another comments
array.
What is the easiest way to grab all comments - threaded or not - on the pull request with JavaScript?