-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add self-hosted Gitlab migration support #9096
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
Conversation
would you add an option |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4e09879
to
7c2dba1
Compare
This comment has been minimized.
This comment has been minimized.
Just add a '#gitlab' fragment to the end of your Clone Address.
8aa129a
to
21b7783
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found a way to test it - worked just fine 🎉
Codecov Report
@@ Coverage Diff @@
## master #9096 +/- ##
=======================================
Coverage 43.26% 43.26%
=======================================
Files 601 601
Lines 85531 85534 +3
=======================================
+ Hits 37001 37010 +9
+ Misses 43958 43951 -7
- Partials 4572 4573 +1
Continue to review full report at Codecov.
|
I think adding #gitlab to the URL for detection feels like a confusing interface -- we should just add a drop down menu or something even if gitlab is the only option for now. I know there should be gitea/gogs at some point too (there is a PR for it) and maybe/hopefully more in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x
@aqtrans are you on this? |
@techknowlogick can we add this to v1.12 since it works only UI has change ... |
I agree with @mrsdizzie here. There should be either a drop-down or a list of radio buttons (auto-detect, GitHub, GitLab, ... others to come). Slight problem here is that GitHub doesn't allow for a custom host address, which would be interesting for consistency (but it can't be helped since the api is provided by GitHub itself). Either way, IMHO it should not be a fragment of the URL. 😁 |
another +1 for what @mrsdizzie said. In GitLab they have a migration page where you first select the forge type (gitlab, github, gitea, etc..) and then it will have different settings based on what you've selected (for example github we may want to have different help text about personal tokens needed for migration), and we could also split mirror and migration as it has lead to confusion in past. @guillep2k our GitHub migration logic would also in theory support github enterprise too at a custom URL. I am thankful for this PR as it has brought up these discussions. If it goes in I wouldn't be upset, and so I won't be a blocker, but I think the high-level needs to be reviewed first. Maybe it goes in temporarily until we can get improve the migration experience? |
@@ -43,6 +44,9 @@ func (f *GitlabDownloaderFactory) Match(opts base.MigrateOptions) (bool, error) | |||
if strings.EqualFold(u.Host, "gitlab.com") && opts.AuthUsername != "" { | |||
matched = true | |||
} | |||
if strings.EqualFold(u.Fragment, "gitlab") && opts.AuthUsername != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For self-hosted gitlab, we need a new option on the UI to let user select.
A new wizard UI is better. I propose we have a migration type selection page before current.
The extra page just give a query param to the current page with a migration type. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
no stale just nobody wants to contribute the frontend 😅 |
It would be great if this could be merged with the #gitlab fragment. I agree it's not "good UI" but at least it would work and I'm eagerly waiting to migrate some projects from my self-hosted Gitlab to Gitea. Thanks in advance! |
@aqtrans do you have time, I wont for in the next weeks ... |
Codecov Report
@@ Coverage Diff @@
## master #9096 +/- ##
==========================================
- Coverage 43.41% 43.39% -0.02%
==========================================
Files 645 645
Lines 71288 71290 +2
==========================================
- Hits 30947 30939 -8
- Misses 35327 35333 +6
- Partials 5014 5018 +4
Continue to review full report at Codecov.
|
This extends PR#9084 to allow migrating from self-hosted Gitlab instances.
Detection is based on adding a '#gitlab' fragment to the end of the given Clone Address.