You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/structs
Jordan 5c092eb0ef
Add support for migrating from Gitlab (#9084)
* First stab at a Gitlab migrations interface.

* Modify JS to show migration for Gitlab

* Properly strip out #gitlab tag from repo name

* Working Gitlab migrations!
Still need to figure out how to hide tokens/etc from showing up in opts.CloneAddr

* Try #2 at trying to hide credentials.
CloneAddr was being used as OriginalURL.
Now passing OriginalURL through from the form and saving it.

* Add go-gitlab dependency

* Vendor go-gitlab

* Use gitlab.BasicAuthClient
Correct CloneURL.
This should be functioning!
Previous commits fixed "Migrated from"
from including the migration credentials.

* Replaced repoPath with repoID globally.
RepoID is grabbed in NewGitlabDownloader

* Logging touchup

* Properly set private repo status.
Properly set milestone deadline time.
Consistently use Gitlab username for 'Name'.

* Add go-gitlab vendor cache

* Fix PR migrations:
- Count of issues is kept to set a non-conflicting PR.ID
- Bool is used to tell whether to fetch Issue or PR comments

* Ensure merged PRs are closed and set with the proper time

* Remove copyright and some commented code

* Rip out '#gitlab' based self-hosted Gitlab support

* Hide given credentials for migrated repos.

CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place

* Use asset.URL directly, no point in parsing.
Opened PRs should fall through to false.

* Fix importing Milestones.
Allow importing using Personal Tokens or anonymous access.

* Fix Gitlab Milestone migration if DueDate isn't set

* Empty Milestone due dates properly return nil, not zero time

* Add GITLAB_READ_TOKEN to drone unit-test step

* Add working gitlab_test.go.
A Personal Access Token, given in env variable GITLAB_READ_TOKEN
is required to run the test.

* Fix linting issues

* Add modified JS files

* Remove pre-build JS files

* Only merged PRs are marged as merged/closed

* Test topics

* Skip test if gitlab is inaccessible

* Grab personal token from username, not password.
Matches Github migration implementation

* Add SetContext() to GitlabDownloader.

* Checking Updated field in Issues.

* Actually fetch Issue Updated time from Gitlab

* Add Gitlab migration GetReviews() stub

* Fix Patch and Clone URLs

* check Updated too

* fix mod

* make vendor with go1.14

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
..
admin_user.go Move sdk structs to modules/structs (#6905) 5 years ago
attachment.go Fix wrong hint when status checking is running on pull request view (#9886) 4 years ago
commit_status.go Fix wrong hint when status checking is running on pull request view (#9886) 4 years ago
doc.go Move sdk structs to modules/structs (#6905) 5 years ago
fork.go Move sdk structs to modules/structs (#6905) 5 years ago
git_blob.go Move sdk structs to modules/structs (#6905) 5 years ago
git_hook.go Move sdk structs to modules/structs (#6905) 5 years ago
hook.go Granular webhook events (#9626) 4 years ago
issue.go [API] expose RepoOwner on Issue responce (#10126) 4 years ago
issue_comment.go Display original author and URL information when showing migrated issues/comments (#7352) 5 years ago
issue_label.go [API] Fix inconsistent label color format (#10129) 4 years ago
issue_milestone.go Move sdk structs to modules/structs (#6905) 5 years ago
issue_reaction.go [API] Fix 9544 | return 200 when reaction already exist (#9550) 5 years ago
issue_stopwatch.go [API] extend StopWatch (#9196) 5 years ago
issue_tracked_time.go [API] Extend times API (#9200) 5 years ago
lfs_lock.go Move sdk structs to modules/structs (#6905) 5 years ago
miscellaneous.go API method to list all commits of a repository (#6408) 5 years ago
notifications.go [API] add endpoint to check notifications [Extend #9488] (#9595) 5 years ago
org.go Add teams to repo on collaboration page. (#8045) 5 years ago
org_member.go Move sdk structs to modules/structs (#6905) 5 years ago
org_team.go [API] orgEditTeam make Fields optional (#9556) 5 years ago
org_type.go Fixes #7023 - API Org Visibility (#7028) 5 years ago
pull.go Fix API deadline removal (#8759) 5 years ago
release.go Add single release page and latest redirect (#11102) 4 years ago
repo.go Add support for migrating from Gitlab (#9084) 4 years ago
repo_branch.go Prevent merge of outdated PRs on protected branches (#11012) 4 years ago
repo_collaborator.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_commit.go [API] Extend contents with dates (#9464) 5 years ago
repo_file.go [API] Extend contents with dates (#9464) 5 years ago
repo_key.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_refs.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_tag.go Fixes #2738 - Adds the /git/tags API endpoint (#7138) 5 years ago
repo_topic.go Add API endpoint for accessing repo topics (#7963) 5 years ago
repo_tree.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_watch.go Move sdk structs to modules/structs (#6905) 5 years ago
status.go Move sdk structs to modules/structs (#6905) 5 years ago
task.go Move migrating repository from frontend to backend (#6200) 5 years ago
user.go Add LastLogin to the User API (#7196) 5 years ago
user_app.go Remove Unused Functions (#10516) 4 years ago
user_email.go Move sdk structs to modules/structs (#6905) 5 years ago
user_gpgkey.go Move sdk structs to modules/structs (#6905) 5 years ago
user_key.go Move sdk structs to modules/structs (#6905) 5 years ago