Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-22009

Creating an empty pull request via API 2.0 endpoint hangs with 504 gateway error

XMLWordPrintable

      Issue Summary

      Creating an empty pull request via API 2.0 endpoint currently hangs with a 504 gateway error.

      Steps to Reproduce

      1. Try to create a pull request via API 2.0 endpoint (see sample CURL command below)
      2. Ensure that the source and destination branches point to the same ref
      3. Change the repo details and credentials

      Sample CURL command:

      curl https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/pullrequests \
          -u bb_username:app_password \
          --request POST \
          --header 'Content-Type: application/json' \
          --data '{
              "title": "some title",
              "description": "some description",
              "source": {
                  "branch": {
                      "name": "SOME_BRANCH"
                  },
                  "repository": {
                      "full_name": "workspace_id/repo_name"
                  }
              },
              "destination": {
                  "branch": {
                      "name": "SOME_BRANCH"
                  },
                  "merge_strategies": "squash"
              },
              "reviewers": [],
              "close_source_branch": false
          }'
      

      Expected Results

      The pull request creation API will return an error message that there are no changes.
      For example:

      There are no changes
      The source and destination are the same.
      

      Actual Results

      The API 2.0 endpoint hangs and returns the "504 Gateway Time-out" error message.

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

              tlechner@atlassian.com Tony Lechner
              mcerezo Mark C
              Votes:
              21 Vote for this issue
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: