output

package
v3.75.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchHeads

func BranchHeads(repo *gogit.Repository) (map[string]*object.Commit, error)

BranchHeads creates a map of branch names to their head commit. This can be used to find if a commit is an ancestor of a branch head.

func FindBranch

func FindBranch(commit *object.Commit, repo *gogit.Repository) string

FindBranch returns the first branch a commit is a part of. Not the most accurate, but it should work similar to pre v3.0.

func GenerateDiff

func GenerateDiff(commit *object.Commit, fileName string) string

GenerateDiff will take a commit and create a string diff between the commit and its first parent.

Types

type GitHubActionsPrinter added in v3.46.0

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

GitHubActionsPrinter is a printer that prints results in GitHub Actions format.

func (*GitHubActionsPrinter) Print added in v3.46.0

type JSONPrinter added in v3.46.0

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

JSONPrinter is a printer that prints results in JSON format.

func (*JSONPrinter) Print added in v3.46.0

type LegacyJSONCompatibleSource

type LegacyJSONCompatibleSource interface {
	GetCommit() string
	GetFile() string
}

type LegacyJSONOutput

type LegacyJSONOutput struct {
	Branch       string   `json:"branch"`
	Commit       string   `json:"commit"`
	CommitHash   string   `json:"commitHash"`
	Date         string   `json:"date"`
	Diff         string   `json:"diff"`
	Path         string   `json:"path"`
	PrintDiff    string   `json:"printDiff"`
	Reason       string   `json:"reason"`
	StringsFound []string `json:"stringsFound"`
}

type LegacyJSONPrinter added in v3.46.0

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

LegacyJSONPrinter is a printer that prints results in legacy JSON format for backwards compatibility.

func (*LegacyJSONPrinter) Print added in v3.46.0

type PlainPrinter added in v3.46.0

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

PlainPrinter is a printer that prints results in plain text format.

func (*PlainPrinter) Print added in v3.46.0

Jump to

Keyboard shortcuts

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