github

package
v0.45.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package github provides automatic migration tools from Github to Harness.

Package github provides automatic migration tools from Github to Harness.

Package github provides automatic migration tools from Github to Harness.

Index

Constants

View Source
const (
	CheckpointKeyUsers = "users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

Error represents a Github error.

func (*Error) Error

func (e *Error) Error() string

type Export

type Export struct {
	// contains filtered or unexported fields
}

func New

func New(
	client *scm.Client,
	org string,
	repo string,
	checkpointer *checkpoint.CheckpointManager,
	logger *gitexporter.FileLogger,
	tracer tracer.Tracer,
	report map[string]*report.Report,
) *Export

func (*Export) FindBranchRuleset

func (e *Export) FindBranchRuleset(
	ctx context.Context,
	repoSlug string,
	ruleID int,
) (*types.BranchRule, *scm.Response, error)

func (*Export) FindEmailByUsername

func (e *Export) FindEmailByUsername(ctx context.Context, username string) (string, error)

func (*Export) GetLFSEnabledSettings added in v0.40.0

func (e *Export) GetLFSEnabledSettings(ctx context.Context, repoSlug string) (bool, error)

func (*Export) GetUserByUserName

func (e *Export) GetUserByUserName(
	ctx context.Context,
	userName string,
) (*types.User, *scm.Response, error)

func (*Export) ListBranchRuleSets

func (e *Export) ListBranchRuleSets(
	ctx context.Context,
	repoSlug string,
	opts types.ListOptions,
) ([]*types.BranchRule, *scm.Response, error)

func (*Export) ListBranchRules

func (e *Export) ListBranchRules(
	ctx context.Context,
	repoSlug string,
	opts types.ListOptions,
) ([]*types.BranchRule, error)

func (*Export) ListBranchRulesInternal

func (e *Export) ListBranchRulesInternal(
	ctx context.Context,
	repoSlug string,
	opts types.ListOptions,
) ([]*types.BranchRule, *scm.Response, error)

func (*Export) ListLabels added in v0.24.0

func (e *Export) ListLabels(
	ctx context.Context,
	repoSlug string,
	opts types.ListOptions,
) (map[string]externalTypes.Label, error)

func (*Export) ListPRComments

func (e *Export) ListPRComments(
	ctx context.Context,
	repoSlug string,
	prNumber int,
	opts types.ListOptions,
) ([]*types.PRComment, *scm.Response, error)

func (*Export) ListPRRequestedReviewers added in v0.43.1

func (e *Export) ListPRRequestedReviewers(
	ctx context.Context,
	repoSlug string,
	prNumber int,
) ([]*types.PRReviewer, *scm.Response, error)

func (*Export) ListPRReviews added in v0.43.1

func (e *Export) ListPRReviews(
	ctx context.Context,
	repoSlug string,
	prNumber int,
	opts types.ListOptions,
) ([]*types.PRReview, *scm.Response, error)

func (*Export) ListPullRequestComments

func (e *Export) ListPullRequestComments(
	ctx context.Context,
	repoSlug string, prNumber int,
	opts types.ListOptions,
) ([]*types.PRComment, error)

func (*Export) ListPullRequestReviews added in v0.43.1

func (e *Export) ListPullRequestReviews(
	ctx context.Context,
	repoSlug string, prNumber int,
	opts types.ListOptions,
) ([]*types.PRReview, error)

func (*Export) ListPullRequests

func (e *Export) ListPullRequests(
	ctx context.Context,
	repoSlug string,
	params types.PullRequestListOptions,
) ([]types.PRResponse, error)

func (*Export) ListRepoLabels added in v0.24.0

func (e *Export) ListRepoLabels(
	ctx context.Context,
	repoSlug string,
	opts types.ListOptions,
) ([]externalTypes.Label, *scm.Response, error)

func (*Export) ListRepositories

func (e *Export) ListRepositories(
	ctx context.Context,
	params types.ListOptions,
) ([]types.RepoResponse, error)

func (*Export) ListRequestedReviewers added in v0.43.1

func (e *Export) ListRequestedReviewers(ctx context.Context, repoSlug string, prNumber int) ([]*types.PRReviewer, error)

ListRequestedReviewers implements gitexporter.Interface (without scm.Response for interface compliance)

func (*Export) ListWebhooks

func (e *Export) ListWebhooks(
	ctx context.Context,
	repoSlug string,
	options types.ListOptions,
) (types.WebhookData, error)

func (*Export) PullRequestRefs

func (e *Export) PullRequestRefs() []config.RefSpec

Jump to

Keyboard shortcuts

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