sync

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllCommitMarkers is a collection of all commit markers supported

View Source
var AllConflictInfos = []ConflictInfo{
	&contentConflictInfo{},
	&deleteModifyConflictInfo{},
	&deleteRenameConflictInfo{},
	&renameRenameConflictInfo{},
	&renameDeleteConflictInfo{},
	&modifyDeleteConflictInfo{},
}

AllConflictInfos is a collection of all merge conflict infos supported

View Source
var SyncCommitBodyHeader = strings.ToUpper(utils.ProjectName)

SyncCommitBodyHeader is a keyword that can be used to prefix a line in the body message of a commit for specifying metadata about the sync process relative to that commit

Functions

func Sync

func Sync(ctx context.Context, git utils.GitHelper, client *github.Client, req *Request) error

Types

type CommitMarker

type CommitMarker string
const (
	// IgnoreCommitMarker is a keyword that can be used for signaling that a given
	// commit should be ignored during the sync process.
	CommitMarkerIgnore CommitMarker = "SYNC_IGNORE"

	// CommitMarkerConflictSkip is a keyword that can be used for signaling that a given
	// commit should be skipped in case of a merge conflict
	CommitMarkerConflictSkip CommitMarker = "SYNC_CONFLICT_SKIP"

	// CommitMarkerConflictApply is a keyword that can be used for signaling that a given
	// commit should be always applied in case of a merge conflict. In case
	// of content conflict markers, the commit's markers are chosen.
	CommitMarkerConflictApply CommitMarker = "SYNC_CONFLICT_APPLY"
)

func (CommitMarker) Description

func (c CommitMarker) Description() string

func (CommitMarker) String

func (c CommitMarker) String() string

type ConflictInfo

type ConflictInfo interface {
	String() string
	Description() string
	RecoverDescription() string
	Recover(git utils.GitHelper, r *Request, c *commitInfo) error
}

ConflictInfo represents information about a merge conflict and how to recover from it

type Request

type Request struct {
	UpstreamOrg     string
	UpstreamRepo    string
	UpstreamHeadRef string
	ForkOrg         string
	ForkRepo        string
	ForkHeadRef     string
	OutBranch       string
	DryRun          bool
}

Request contains all the info required for performing a fork scan

Jump to

Keyboard shortcuts

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