Import approvals from Bitbucket server
What does this MR do and why?
Imports approvals from Bitbucket Server.
Bitbucket returns approval events in the activities
API along with merge events so I've opted to add it in the same place as merge events.
In order to create the approval, we need to create 3 records:
- An approval
- An event
- A reviewer if it doesn't exist
For all of these we want to keep the original timestamp because it's important to know when an approval happened.
This follows the same logic as how the GitHub importer imports approvals: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/github_import/importer/pull_requests/review_importer.rb#L24-L26.
Screenshots or screen recordings
Timestamps are the same:
How to set up and validate locally
- Setup bitbucket server and create a pull request.
- Review the PR and approve.
- Import the project into gitlab and note that the approval info is correctly imported.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #23586 (closed)