Set up an instance of Bitbucket Server which is a Smart Mirror of a repository on bitbucket.org
Merge a PR, making sure to have the option selected for "Close source branch".
Expected behaviour is that the updates are synced to the mirror. Actual behaviour is that they updates may not be synced (not even when the scheduled task runs to sync).
Workaround is to push a new commit to the repo (or tag the PR branch, to trigger a new commit), which does sync the latest changes to the mirror.
When the PR is merged, two "push event" requests are being sent from bitbucket.org to BBS.
The set of changes in one of the requests is successfully applied.
The set of changes in the second request is not successfully applied, and it does not schedule any fetch.
Then the timestamp is updated on the mirror repo, matching the one on the upstream. Since the timestamp is used by the scheduled job to determine if there are any differences between the mirror and upstream, and the timestamps are the same, no further sync is done - unless further changes are made to the upstream repo.
Note that there is no endpoint or other mechanism to trigger a sync on the mirror