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

Using the API to create a PR comment with the property "inline.path" being empty, breaks several features of the PR.

XMLWordPrintable

      Issue Summary

      Using our API to create a PR comment with the property inline.path being empty breaks several features of that PR.

      Steps to Reproduce

      1. Use this API endpoint to create a comment in a Pull request, and in the API call's data provide an empty path for the property ineline.path, e.g.
          "inline": {
            "to": 4,
            "path": ""
          }
        

      Expected Results

      The comment shouldn't be added to the PR and the following functionality shouldn't break:

      • The Overview tab of the PR shows the PR activity
      • Comments made before and after the problematic API call should be visible in the Files tab of the PR
      • An API call to return the PR's comment works

      Actual Results

      Adding a PR comment with a call like the above returns a 500 error with the message "Something went wrong". Afterwards:

      • The Overview tab of the PR doesn't show the PR activity. It instead shows a message "Couldn't load activity"
      • Comments made before the problematic API call are not visible in the Files tab of the PR
      • Comments made after the problematic API call via the UI are visible only when they are added. If you navigate away to another page and then open the PR's page again, they no longer show up.
      • An API call to return all comments of the PR returns a 500 error with the message "Something went wrong"

      Workaround

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

              Unassigned Unassigned
              tboudale Theodora Boudale (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: