Set default branch after importing repo from Bitbucket Cloud
What does this MR do and why?
Fixes Import from BitBucket Cloud: commit count not u... (#27555 - closed) whereby the commit count on the project page shows 0 where it should be non-zero.
The fix is to set the default branch after importing the repository which triggers a callback to update the commit count async. The implementation is the same as for the GitHub importer.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Checkout master
- Import a project (that contains commits on the default branch) from Bitbucket Cloud into gitlab
- Go to the project's page and note that it shows 0 commits
- Checkout this branch
- Re-import the project
- Note that the commit count is now non-zero
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 #27555 (closed)
Edited by Madelein van Niekerk