migrate

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayNameToIdentifier added in v0.22.0

func DisplayNameToIdentifier(displayName string) string

DisplayNameToIdentifier converts display name to a unique identifier.

func LogNotSupportedWebhookEvents added in v0.22.0

func LogNotSupportedWebhookEvents(repoSlug string, notSupportedHooks []*scm.Hook, logger gitexporter.Logger) error

func MapWebhooks added in v0.22.0

func MapWebhooks(
	hooks []*scm.Hook,
	mapEvents func(events []string) ([]enum.WebhookTrigger, []string),
) ([]*scm.Hook, []*scm.Hook)

Types

type ClientInterface added in v0.22.0

type ClientInterface interface {
	ListPRComments(ctx context.Context, repoSlug string, prNumber int, opts types.ListOptions) ([]*types.PRComment, *scm.Response, error)
	ListBranchRules(ctx context.Context, repoSlug string, logger gitexporter.Logger, opts types.ListOptions) ([]*types.BranchRule, *scm.Response, error)
	ListBranchRulesets(ctx context.Context, repoSlug string, opts types.ListOptions) (*[]types.BranchRule, *scm.Response, error)
	FindBranchRuleset(ctx context.Context, repoSlug string, logger gitexporter.Logger, ruleID int) (*types.BranchRule, *scm.Response, error)
}

type HunkHeader added in v0.30.0

type HunkHeader struct {
	OldLine int
	OldSpan int
	NewLine int
	NewSpan int
	Text    string
}

func ParseDiffHunkHeader added in v0.30.0

func ParseDiffHunkHeader(line string) (HunkHeader, bool)

type Importer

type Importer struct {
	Harness    harness.Client
	ScmClient  *scm.Client
	HarnessOrg string

	ScmType  string // github, gitlab, bitbucket
	ScmLogin string
	ScmToken string

	RepositoryList []string

	DockerConn string
	RepoConn   string

	KubeName string
	KubeConn string

	Tracer tracer.Tracer

	Downgrade bool
}

func (*Importer) Import

func (m *Importer) Import(ctx context.Context, data *types.Org) error

Directories

Path Synopsis
Package bitbucket provides automatic migration tools from Bitbucket Cloud to Harness.
Package bitbucket provides automatic migration tools from Bitbucket Cloud to Harness.
Package circle provides automatic migration tools from Circle to Harness.
Package circle provides automatic migration tools from Circle to Harness.
client
Package client provides a Circle http client.
Package client provides a Circle http client.
Package drone provides automatic migration tools from Drone to Harness.
Package drone provides automatic migration tools from Drone to Harness.
Package github provides automatic migration tools from Github to Harness.
Package github provides automatic migration tools from Github to Harness.
Package gitlab provides automatic migration tools from GitLab to Harness.
Package gitlab provides automatic migration tools from GitLab to Harness.
Package travis provides automatic migration tools from Travis to Harness.
Package travis provides automatic migration tools from Travis to Harness.

Jump to

Keyboard shortcuts

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