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.
gitea/modules
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>
5 years ago
..
analyze Migrate to go-enry new version (#10906) 5 years ago
auth Prevent merge of outdated PRs on protected branches (#11012) 5 years ago
avatar Improve handling of non-square avatars (#7025) 6 years ago
base Add gitea-vet (#10948) 5 years ago
cache make avatar lookup occur at image request (#10540) 5 years ago
charset deps: update and fix chardet import (#9351) 5 years ago
context Fix release counter on API repository info (#10968) 5 years ago
convert Prevent merge of outdated PRs on protected branches (#11012) 5 years ago
cron Refactor repository check and sync functions (#9854) 5 years ago
generate Add gitea-vet (#10948) 5 years ago
git Migrate to go-enry new version (#10906) 5 years ago
gitgraph Move git graph from models to modules/graph (#9027) 5 years ago
graceful Restore graceful restart on SIGHUP (#10224) 5 years ago
highlight Add a lot of extension to language mappings for syntax highlights (#7741) 6 years ago
httplib Add golangci (#6418) 6 years ago
indexer Migrate to go-enry new version (#10906) 5 years ago
lfs Add gitea-vet (#10948) 5 years ago
log modules/log: remove noop written variables (#10182) 5 years ago
markup Handle yaml frontmatter (#11016) 5 years ago
metrics Prometheus endpoint (#5256) 6 years ago
migrations Add support for migrating from Gitlab (#9084) 5 years ago
notification add request review from specific reviewers feature in pull request (#10756) 5 years ago
options Rename scripts to build and add revive command as a new build tool command (#10942) 5 years ago
password Add password requirement info on error (#9074) 5 years ago
pprof Add golangci (#6418) 6 years ago
private Upgrade golangci-lint to 1.24.0 (#10894) 5 years ago
process Add gitea-vet (#10948) 5 years ago
public Send 404 immediately for known public requests (#11117) 5 years ago
queue Avoid logging []byte in queue failures - convert to string first (#10865) 5 years ago
recaptcha fixed reCAPTCHA URL (#9083) 5 years ago
references Accept punctuation after simple+cross repository issue references (#10091) 5 years ago
repofiles Avoid 0 new commits messages to be send (#11082) 5 years ago
repository Fix forked repo has no icon and language stat. (#10791) 5 years ago
secret Integrate OAuth2 Provider (#5378) 6 years ago
session Use gitea forked macaron (#7933) 6 years ago
setting Add Matrix webhook (#10831) 5 years ago
ssh log.Fatal on failure to listen to SSH port (#10795) 5 years ago
structs Add support for migrating from Gitlab (#9084) 5 years ago
sync Fix missing unlock in uniquequeue (#9790) 5 years ago
task Move create/fork repository from models to modules/repository (#9489) 5 years ago
templates Rename scripts to build and add revive command as a new build tool command (#10942) 5 years ago
test Add Organization Wide Labels (#10814) 5 years ago
timeutil Use gitea forked macaron (#7933) 6 years ago
upload Fix upload file type check (#7890) 6 years ago
user Add gitea-vet (#10948) 5 years ago
util inform participants on UI too (#10473) 5 years ago
validation [API] Get a single commit via Ref (#10915) 5 years ago
webhook Add Matrix webhook (#10831) 5 years ago