sync

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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