codecomments

package
v1.0.4-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Migrator

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

Migrator is a utility used to migrate code comments after update of the pull request's source branch.

func ProvideMigrator

func ProvideMigrator(
	git git.Interface,
) *Migrator

func (*Migrator) MigrateNew

func (migrator *Migrator) MigrateNew(
	ctx context.Context,
	repoGitUID string,
	newSHA string,
	comments []*types.CodeComment,
)

MigrateNew updates the "+" (the added lines) part of code comments after a new commit on the pull request's source branch. The parameter newSHA should contain the latest commit SHA of the pull request's source branch.

func (*Migrator) MigrateOld

func (migrator *Migrator) MigrateOld(
	ctx context.Context,
	repoGitUID string,
	newSHA string,
	comments []*types.CodeComment,
)

MigrateOld updates the "-" (the removes lines) part of code comments after the pull request's change of the merge base commit.

Jump to

Keyboard shortcuts

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