The Wayback Machine - https://web.archive.org/web/20211229003809/https://github.com/go-gitea/gitea/pull/16767
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migration from GitBucket #16767

Merged
merged 10 commits into from Nov 14, 2021
Merged

Add migration from GitBucket #16767

merged 10 commits into from Nov 14, 2021

Conversation

@KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Aug 21, 2021

This PR adds GitBucket as migration source. GitBucket claims to be api compatible with Github so I reused the Github downloader.

Supported:

  • Milestones
  • Issues
  • Pull Requests
  • Comments
  • Reviews
  • Labels

There is no usable public instance so I have not added tests.

@KN4CK3R KN4CK3R added this to the 1.16.0 milestone Aug 21, 2021
@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Aug 22, 2021

Codecov Report

No coverage uploaded for pull request base (main@d2163df). Click here to learn what that means.
The diff coverage is 54.05%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16767   +/-   ##
=======================================
  Coverage        ?   45.48%           
=======================================
  Files           ?      799           
  Lines           ?    88961           
  Branches        ?        0           
=======================================
  Hits            ?    40466           
  Misses          ?    42000           
  Partials        ?     6495           
Impacted Files Coverage Δ
modules/convert/utils.go 81.81% <0.00%> (ø)
modules/migrations/gitbucket.go 18.18% <18.18%> (ø)
modules/migrations/github.go 69.08% <63.52%> (ø)
modules/structs/repo.go 75.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2163df...c9ba378. Read the comment docs.

@lunny lunny mentioned this pull request Aug 22, 2021
22 tasks
@lunny
Copy link
Member

@lunny lunny commented Aug 22, 2021

GitBucket is not http://bitbucket.org . It seems online demo is not avaiable.

@roop90
Copy link

@roop90 roop90 commented Aug 22, 2021

There is a Public Demo Instance:

https://gitbucket.herokuapp.com/
Login is root/root.

Hope this helps.

@KN4CK3R
Copy link
Member Author

@KN4CK3R KN4CK3R commented Aug 22, 2021

That's right but for tests we need a reliable host. A repository there could/will change and is not usable for tests.

@6543
Copy link
Member

@6543 6543 commented Aug 29, 2021

@KN4CK3R

There is no usable public instance so I have not added tests.

#12919 (comment)

EDIT: I worked on this a bit too but did not find a nice sdk so did focus on gogs, etc instead

@KN4CK3R
Copy link
Member Author

@KN4CK3R KN4CK3R commented Aug 29, 2021

@6543 That's Bitbucket and not GitBucket.

@6543
Copy link
Member

@6543 6543 commented Aug 29, 2021

aaa - did missed it too

@6543
Copy link
Member

@6543 6543 commented Aug 29, 2021

@KN4CK3R please resolve conflicts - I'll test manually once https://gitbucket.herokuapp.com/ is up and running - code looks good so far :)

@6543 6543 self-requested a review Aug 29, 2021
@lunny
Copy link
Member

@lunny lunny commented Aug 29, 2021

@KN4CK3R

There is no usable public instance so I have not added tests.

#12919 (comment)

EDIT: I worked on this a bit too but did not find a nice sdk so did focus on gogs, etc instead

see #16767 (comment)

@6543
Copy link
Member

@6543 6543 commented Aug 29, 2021

@KN4CK3R localy tested and got error:
Migrate repository from http://localhost:8080/test/aaaa failed: error while listing repos: GET http://localhost:8080/api/v3/repos/test/aaaa/pulls/1/reviews?per_page=100: 404 Not Found [] - i think we have to ignore reviews like reactions too

EDIT: closed issues are not migrated only open one 😆

@KN4CK3R
Copy link
Member Author

@KN4CK3R KN4CK3R commented Sep 8, 2021

The closed issues issue should now be gone. I created a PR for that: gitbucket/gitbucket#2859

6543
6543 approved these changes Sep 8, 2021
@eitsupi
Copy link

@eitsupi eitsupi commented Oct 18, 2021

Any update?

@lunny
Copy link
Member

@lunny lunny commented Oct 20, 2021

Looks like CI failed is unrelated.

lunny
lunny approved these changes Nov 14, 2021
@6543 6543 merged commit 42ea002 into go-gitea:main Nov 14, 2021
2 checks passed
@KN4CK3R KN4CK3R deleted the feature-migrate-gitbucket branch Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants