Skip to content

BitBucket Cloud Importer - Preserve PR (MR) reviewers

Similar to #416611 (closed) which covers the case for Importer:Bitbucket Server we should ensure that PR (MR) reviewers are being imported correctly.

From the docs the pullrequests endpoint includes a reviewers field that should contain the relevant information.

{
  "size": 142,
  "page": 102,
  "pagelen": 159,
  "next": "<string>",
  "previous": "<string>",
  "values": [
    {
      "type": "<string>",
      "links": {
        "self": {
          "href": "<string>",
          "name": "<string>"
        },
        "html": {
          "href": "<string>",
          "name": "<string>"
        },
        "commits": {
          "href": "<string>",
          "name": "<string>"
        },
        "approve": {
          "href": "<string>",
          "name": "<string>"
        },
        "diff": {
          "href": "<string>",
          "name": "<string>"
        },
        "diffstat": {
          "href": "<string>",
          "name": "<string>"
        },
        "comments": {
          "href": "<string>",
          "name": "<string>"
        },
        "activity": {
          "href": "<string>",
          "name": "<string>"
        },
        "merge": {
          "href": "<string>",
          "name": "<string>"
        },
        "decline": {
          "href": "<string>",
          "name": "<string>"
        }
      },
      "id": 108,
      "title": "<string>",
      "rendered": {
        "title": {
          "raw": "<string>",
          "markup": "markdown",
          "html": "<string>"
        },
        "description": {
          "raw": "<string>",
          "markup": "markdown",
          "html": "<string>"
        },
        "reason": {
          "raw": "<string>",
          "markup": "markdown",
          "html": "<string>"
        }
      },
      "summary": {
        "raw": "<string>",
        "markup": "markdown",
        "html": "<string>"
      },
      "state": "OPEN",
      "author": {
        "type": "<string>"
      },
      "source": {},
      "destination": {},
      "merge_commit": {
        "hash": "<string>"
      },
      "comment_count": 51,
      "task_count": 53,
      "close_source_branch": true,
      "closed_by": {
        "type": "<string>"
      },
      "reason": "<string>",
      "created_on": "<string>",
      "updated_on": "<string>",
      "reviewers": [
        {
          "type": "<string>"
        }
      ],
      "participants": [
        {
          "type": "<string>"
        }
      ]
    }
  ]
}