gitimporter

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAbortMigration = errors.New("aborting the migration. please checkout your command and try again")

Functions

This section is empty.

Types

type Flags

type Flags struct {
	SkipUsers     bool
	FileSizeLimit int64
	NoPR          bool
	NoWebhook     bool
	NoRule        bool
	NoLabel       bool
}

type Importer

type Importer struct {
	Harness harness.Client

	HarnessSpace    string
	HarnessRepo     string // optional for single repo import
	HarnessToken    string
	Endpoint        string
	ZipFileLocation string

	Gitness bool
	Tracer  tracer.Tracer

	RequestId string
	// contains filtered or unexported fields
}

Importer imports data from gitlab to Harness.

func NewImporter

func NewImporter(
	baseURL,
	space,
	repo,
	token,
	location,
	requestId string,
	gitness,
	trace bool,
	flags Flags,
	tracer tracer.Tracer) *Importer

func (*Importer) CheckUsers

func (m *Importer) CheckUsers(users []string) ([]string, error)

func (*Importer) CreateRepo

func (m *Importer) CreateRepo(
	repo *types.Repository,
	targetSpace string,
	tracer tracer.Tracer,
) (*harness.Repository, error)

func (*Importer) Import

func (m *Importer) Import(ctx context.Context) error

func (*Importer) ImportBranchRules

func (m *Importer) ImportBranchRules(
	repoRef string,
	repoFolder string,
) error

func (*Importer) ImportLabels added in v0.24.0

func (m *Importer) ImportLabels(
	repoRef string,
	repoFolder string,
) error

func (*Importer) ImportPullRequests

func (m *Importer) ImportPullRequests(
	repoRef string,
	repoFolder string,
) error

func (*Importer) ImportWebhooks

func (m *Importer) ImportWebhooks(
	repoRef string,
	repoFolder string,
) error

func (*Importer) Push

func (m *Importer) Push(
	ctx context.Context,
	repoPath string,
	repo *harness.Repository,
	tracer tracer.Tracer,
) error

func (*Importer) ReadRepoInfo

func (m *Importer) ReadRepoInfo(dir string) (types.Repository, error)

Jump to

Keyboard shortcuts

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