upstreamsync

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package upstreamsync analyzes and promotes pinned upstream revisions.

Index

Constants

View Source
const (
	ClassWire    = "wire-format"
	ClassAPI     = "API-surface"
	ClassFeature = "feature-only"
	ClassDocs    = "docs"
)

Variables

View Source
var (
	ErrRed             = errors.New("upstream sync is red")
	ErrPromotionUnsafe = errors.New("upstream lock promotion refused")
)

Functions

This section is empty.

Types

type Change

type Change struct {
	Status         string
	OldPath        string
	Path           string
	Classification string
	Targets        []string
	WPs            []string
}

type Check

type Check struct {
	Status string
	Output string
}

type Config

type Config struct {
	Root        string
	UpstreamDir string
	Target      string
	ReportPath  string
	Fetch       bool
	DryRun      bool
	Bump        bool
	Now         time.Time
	Stdout      io.Writer
	// contains filtered or unexported fields
}

Config controls one upstream analysis or promotion run.

type FixtureChange

type FixtureChange struct {
	Status   string
	Path     string
	OldBytes int64
	NewBytes int64
	OldHash  string
	NewHash  string
}

type Lock

type Lock struct {
	Repo     string `json:"repo"`
	Commit   string `json:"commit"`
	Version  string `json:"version"`
	SyncedAt string `json:"syncedAt"`
}

type Result

type Result struct {
	Base              Lock
	TargetCommit      string
	TargetRef         string
	TargetVersion     string
	TargetDate        string
	TargetSubject     string
	Descendant        bool
	Changes           []Change
	FixtureChanges    []FixtureChange
	Extraction        Check
	Conformance       Check
	Green             bool
	Promotion         string
	Report            string
	ReportPath        string
	UnmappedPathCount int
}

func Run

func Run(ctx context.Context, config Config) (Result, error)

Run fetches and analyzes one upstream revision, then optionally promotes it.

Directories

Path Synopsis
cmd
pigosync command

Jump to

Keyboard shortcuts

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