glgh

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 6 Imported by: 0

README

glgh

glgh moves issues from GitLab repository to GitHub repository.

Usage

Creating a mirror of a project

Clone the repo from GitLab using the --mirror option. This is like --bare but also copies all refs as-is. Useful for a full backup/move. git clone --mirror git@your-gitlab-site.com:username/repo.git

Change into newly created repo directory

cd repo

Push to GitHub using the --mirror option. The --no-verify option skips any hooks.

git push --no-verify --mirror git@github.com:username/repo.git

Set push URL to the mirror location

git remote set-url --push origin git@github.com:username/repo.git

To periodically update the repo on GitHub with what you have in GitLab

git fetch -p origin
git push --no-verify --mirror

After doing this, the autolinking of issues, commits, and branches will work.

Setting up authentication tokens

You will need personal OpenAuth tokens for both GitLab and GitHub.

For GitLab token go to https://gitlab.com/profile/personal_access_tokens. Create a new Access Token with api and read_repository scopes.

For GitHub token go to https://github.com/settings/tokens. Generate a new token with repo, admin:org, user scope.

Compile and run glgh -V first time to generate configuration file at ~/.config/glgh.yaml, edit this file according to your needs.

Running the program

Run glgh to read all the tickets from GitLab and cache them on disk. If you do want to update the cache run glgh -r.

This commands will read issues from GitLab repo and recreate them again at GitHub.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = ""
	Build   = ""
)

Functions

This section is empty.

Types

type GlGh

type GlGh interface {
	// Issues transfers issues from GitLab repo to GitHub repo.
	Issues() error
}

GlGh interface migrates metadata from GitLab to GitHub.

func NewGlGh

func NewGlGh(cfg config.Config) GlGh

Directories

Path Synopsis
entity
cmd
io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL