forge

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 5 Imported by: 0 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

Overview

Package forge resolves a heraut config into one or more port.ForgeIdentity values, filling gaps from the ambient CI environment or the git origin remote when the config leaves fields unset. See ADR-0043 and docs/superpowers/specs/2026-07-24-forge-abstraction-design.md §3.

Index

Constants

This section is empty.

Variables

View Source
var ErrAmbiguousForge = errors.New("ambiguous forge")

ErrAmbiguousForge is returned by Resolve when zero-config auto-detection finds more than one candidate forge type and nothing (CI, git origin) pins a single one.

Functions

This section is empty.

Types

type Resolved

type Resolved struct {
	Forges          []port.ForgeIdentity
	EnrichmentIndex int
}

Resolved is the outcome of Resolve: the resolved forge identities (by config order, or the single auto-detected one) and the index into Forges that is the enrichment source.

func Resolve

func Resolve(cfg *config.Config, getenv func(string) string, gitOrigin string) (Resolved, error)

Resolve builds one port.ForgeIdentity per cfg.Forges entry (filling gaps from CI/git origin), or — when cfg.Forges is empty — auto-detects exactly one forge from the CI environment or the git origin remote. getenv and gitOrigin are injected for testability; production callers pass os.Getenv and the parsed `git remote get-url origin`.

Directories

Path Synopsis
Package gitlab implements port.Forge for GitLab over stdlib net/http.
Package gitlab implements port.Forge for GitLab over stdlib net/http.

Jump to

Keyboard shortcuts

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