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

XMLWordPrintable

    • 16
    • Severity 3 - Minor

      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

            Assignee:
            Tony Lechner
            Reporter:
            Mark C
            Votes:
            21 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved: