update the README

This commit is contained in:
eyedeekay
2025-04-21 00:30:43 -04:00
parent 4836dab877
commit 41e854efa8
5 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View File

@ -25,6 +25,7 @@ go.work.sum
.env
/migrate
/unmigrate
/forkfix
/migration_state.json
log.log
err.log

View File

@ -1,4 +1,13 @@
fmt:
@echo "Running gofumpt..."
find . -name '*.go' -exec gofumpt -w -s -extra {} \;
find . -name '*.go' -exec gofumpt -w -s -extra {} \;
migrate:
go build -o migrate ./cmd/migrate
unmigrate:
go build -o unmigrate ./cmd/unmigrate
forkfix:
go build -o forkfix ./cmd/forkfix

View File

@ -4,6 +4,8 @@ Go-based tool for migrating GitLab repositories, users, groups, issues and relat
More-or-less a port of [gitlab-to-gitea](https://git.autonomic.zone/kawaiipunk/gitlab-to-gitea) from python to Go because *fixing* python appears to be a thing I just can't get my mind around, but *rewriting* it? I'm actually OK at that.
Also includes: `cmd/forkfix`, for fixing fork relationships between migrated repositories by manipulating the gitea mysql database and `cmd/unmigrate` to delete everything from a gitea instance except for the admin users.
## Core Functionality
- Migrates users, groups, and their relationships from GitLab to Gitea
@ -12,6 +14,15 @@ More-or-less a port of [gitlab-to-gitea](https://git.autonomic.zone/kawaiipunk/g
- Supports resumable migrations through state tracking
- Handles username normalization and entity mapping between platforms
## Go Implementation Improvements
- Modular package structure instead of monolithic script
- Configuration via environment variables rather than hardcoded values
- Added utility tools (`forkfix` and `unmigrate`)
- Database connectivity for commit action imports
- Improved error handling with recovery mechanisms
- Separation of API client code from migration logic
## Installation
1. Ensure Go 1.24+ is installed

1
go.mod
View File

@ -5,6 +5,7 @@ go 1.24.2
require (
github.com/go-sql-driver/mysql v1.9.2
github.com/joho/godotenv v1.5.1
github.com/mattn/go-sqlite3 v1.14.28
github.com/xanzy/go-gitlab v0.115.0
)

2
go.sum
View File

@ -28,6 +28,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A=
github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=