Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7643

Make "path" optional for the pull requests comments REST API function

    • Icon: Suggestion Suggestion
    • Resolution: Answered
    • None
    • API - REST
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      This suggestion is to make the "path" parameter optional for the function http://example.com/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments, since general comments on pull requests aren't anchored to a path, thus you can't get them using this function - currently it's only possible to get comments from files using it.

      If you try not setting the "path", the return is:

      {"errors":[{"context":null,"message":"The path query parameter is required when retrieving comments.","exceptionName":null}]}
      

          Form Name

            [BSERV-7643] Make "path" optional for the pull requests comments REST API function

            go-vinda added a comment -

            We within our enterprise use Bitbucket server on-premise. We are keen to implement a Gitops style process on how we merge pull-requests. So it would be really helpful to get comments on the pull-request itself.

            the comments can be commands/instructions very similar to prow project in kubernetes/test-infra.

             

            So, need to fetch comments at PR (instead of paths) would help.

            go-vinda added a comment - We within our enterprise use Bitbucket server on-premise. We are keen to implement a Gitops style process on how we merge pull-requests. So it would be really helpful to get comments on the pull-request itself. the comments can be commands/instructions very similar to prow project in kubernetes/test-infra.   So, need to fetch comments at PR (instead of paths) would help.

            Adam Ahmed (Inactive) added a comment - gyerts2114728143 - see this answer https://answers.atlassian.com/questions/21634693/answers/21634860

            gyerts added a comment -

            Please tell my what I should to do to reach commentaries of pull-request?

            gyerts added a comment - Please tell my what I should to do to reach commentaries of pull-request?

            I think the activity API is the right approach for getting this information.

            Roger Barnes (Inactive) added a comment - I think the activity API is the right approach for getting this information.

              Unassigned Unassigned
              grefosco Gustavo Refosco (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: