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 Config ¶
type Config struct {
// QueueName identifies the queue this ChangeProvider serves.
QueueName string
}
Config carries the per-queue identity handed to a Factory. The system knows only the queue name; everything an implementation needs is injected at construction by the integrator.
type Factory ¶
type Factory interface {
// For returns the ChangeProvider for the given queue.
For(cfg Config) (ChangeProvider, error)
}
Factory builds the ChangeProvider for a queue. Implementations are provided by integrators (and tests) and inject whatever they need at construction.
Click to show internal directories.
Click to hide internal directories.