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

Pull Request REST resource returns only pull requests in an OPEN state

    XMLWordPrintable

Details

    Description

      For the REST end-point:

      /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests?direction&at&state&order
      

      the REST documentation describes the state query parameter as:

      (optional) a specific state to filter pull requests by.
      

      When in actual fact, the REST end-point defaults to only returning OPEN pull requests if the state parameter is not supplied.

      GET /projects/{projectKey}/repos/{repositorySlug}/pull-requests?state=DECLINED
      

      Will return declined pull requests.

      GET /projects/{projectKey}/repos/{repositorySlug}/pull-requests?state=MERGED
      

      Will return merged pull requests.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tim@atlassian.com TimP
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: