changeprovider

package
v0.1.0-dev7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 2 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

This section is empty.

Functions

This section is empty.

Types

type ChangeInfo

type ChangeInfo struct {
	// URI is the full change URI for correlation with the input request
	// (e.g., "github://uber/repo/pull/98/c3a4d5e6f7890123456789abcdef0123456789ab" or "phab://D123/xyz789").
	URI string
	// User is the author of the change.
	User User
	// ChangedFiles is the list of files modified in this change. Order is unspecified.
	ChangedFiles []ChangedFile
}

ChangeInfo contains metadata and file changes for a code change.

type ChangeProvider

type ChangeProvider interface {
	// Get retrieves change information for the provided Change.
	// For a Change with multiple URIs (e.g., stacked PRs), returns one ChangeInfo per URI.
	// Returns a slice of ChangeInfo, one for each change in the stack.
	Get(ctx context.Context, change entity.Change) ([]ChangeInfo, error)
}

ChangeProvider fetches change metadata from external systems Each implementation is configured for a specific provider (GitHub, GitLab, Phabricator).

type ChangedFile

type ChangedFile struct {
	// Path is the file path relative to the repository root.
	Path string
	// Patch is the diff patch content for this file.
	Patch string
	// LinesAdded is the number of lines added in this file.
	LinesAdded int
	// LinesDeleted is the number of lines deleted in this file.
	LinesDeleted int
}

ChangedFile represents a single file modification in a change.

type User

type User struct {
	// Name is the display name of the user.
	Name string
	// Email is the email address of the user.
	Email string
}

User represents the author of a change.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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