Skip to content

Add endpoint to list comments #26

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 3 commits into from
Aug 14, 2017
Merged

Conversation

machadoit
Copy link
Member

Add endpoint to list comments

It was hard to understand the difference between createComment and createPullRequestComment
The createPullRequestComment creates a comment that is not on a line (like PR summary)
Copy link
Contributor

@mrfyda mrfyda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, missing pagelen param

@@ -92,4 +94,10 @@ class PullRequestServices(client: BitbucketClient) {
client.delete(url)
}

def listComments(author: String, repo: String, pullRequestId: Int): RequestResponse[Seq[SimplePullRequestComment]] = {
val url = s"https://bitbucket.org/!api/1.0/repositories/$author/$repo/pullrequests/$pullRequestId/comments"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?pagelen=100

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok thx!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pagination is for v2, and unfortunately v2 no longer has the "anchor" that I need.. Even bitbucket themselves use their v1 API for comments when showing a PR online 😭

@machadoit machadoit merged commit 48108cb into master Aug 14, 2017
@pedrorijo91 pedrorijo91 deleted the bitbucket-comments-ft-3108 branch August 14, 2017 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants