I am trying to use the CommentService to add a comment through Java code.
This is what I have:
AddCommentRequest addCommentRequest = new AddCommentRequest.Builder(request.getPullRequest(), "a comment").build();
Comment comment = commentService.addComment(addCommentRequest);
I see in the logs the code is executed, but it is being executed as "GET" instead of a "POST" and it's not showing up in the UI. Is there something else I need to do to add comments in the activities of a pull request?
"GET /rest/api/latest/projects/..../repos/testbitbucketplugin/pull-requests/1/merge HTTP/1.1" c.a.s.i.n.DefaultNotificationManager Managing notification: PullRequestActivityNotification{user=InternalNormalUser{id=1, username=admin}, timestamp=Wed Jan 17 11:41:27 EST 2018, pullRequest=testbitbucketplugin:3, activity=InternalPullRequestCommentActivity{id=133, user=InternalNormalUser{id=1, username=admin}, action=COMMENTED, pullRequest.id=3, commentAction=ADDED, comment=InternalComment{id=23, author=InternalNormalUser{id=1, username=admin}, text=a comment}}