Skip to content

[GEI] Missing PR comments and review status (Approve/Changes requested) when migrating batched reviews from Bitbucket Server #1514

@qqwayne

Description

@qqwayne

Description

We migrated a repository from Bitbucket Server to GitHub using GitHub Enterprise Importer (gh bbs2gh v1.27.0).
Although the migration state is SUCCEEDED with warningsCount:0, we are experiencing a critical issue where PR comments and Review statuses (Approve/Request changes) are silently dropped if they were published using Bitbucket's "Batching reviews" feature.
[Issue Details]
When a user accumulates multiple comments in "Pending" state on Bitbucket and publishes them all at once along with an "Approve" status, the exported activities.json records identical comment.createdTimestamp for all those comments down to the millisecond.
When GEI imports this:

Only one comment is imported into GitHub (likely due to deduplication/overwriting based on identical timestamps and author).

Consequently, the PR Review object fails to form properly, and the subsequent "APPROVED" or "NEEDS_WORK" (Request changes) action is completely lost/dropped from the PR timeline.

Reproduction Steps

Step 1: Actions in Bitbucket Server (Creating Batched Review Data)

Create or open a Pull Request (PR) on your Bitbucket Server.

Go to the PR's "Diff" view, select a line of code (or a file), and enter a comment. Ensure the "Start review" checkbox is checked, then click "Add to review". (The comment will be saved as a "Pending" draft).

Add another comment to a different file or line and click "Add to review". (Make sure you accumulate at least two pending draft comments).

Click the "Finish review" button.

In the dialog that appears, select a status: "Approve" or "Needs work".

Click the "Publish" button to submit the accumulated comments and the review status simultaneously.

Step 2: Run the Migration using GEI (gh bbs2gh)

Export the migration archive (.tar file) for the target repository from the Bitbucket Server.

Run the GitHub CLI (gh bbs2gh migrate-repo) to migrate the repository from Bitbucket to GitHub.

Note: The CLI execution log does not output any errors. It appears to finish normally with State: SUCCEEDED and warningsCount:0.

Step 3: Verify the Results on GitHub (Observing the Bug)

Access the migrated repository on GitHub and open the corresponding Pull Request.

[Expected Behavior]

All batched review comments should be displayed.

The review status event ("Approve" or "Changes requested") should be properly recorded in the PR timeline.

[Actual Bug Behavior]

Issue 1: Only one of the multiple comments added in Bitbucket is displayed; the rest are missing.

Issue 2: The PR review status ("Approve" or "Changes requested") submitted at the same time is completely missing from the PR timeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions