assistedby

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 2 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 assistedby holds the third form of the `Assisted-by:` trailer, the label abcd declares on a commit it composes from record facts (ruling PC1, the technical facilitator, 2026-10-02): `Assisted-by: abcd:<version>`, beside a model's `<Vendor>:<model-version>` and `None`.

It is also the one Go home of the model form's value grammar (model.go), the gate's TRAILER_RE, which the same two readers need.

It is the label's one Go home. The implement loop writes it (the pick's record-only commit, the sync's merge commit, and the landing's pull-request body, where the models' lines follow it) and refuses a receipt that claims it; the site's authorship tally reads it and counts it apart from both assistance and None. scripts/check-attribution.sh decides the grammar (ABCD_RE and ABCD_ANY_RE) and runs in CI without Go, so the two halves share a test rather than code: TestComposedLabelGrammarMatchesTheGate.

Index

Constants

View Source
const DevLabel = "dev"

DevLabel is the version half for a binary built without a release version: a development build, which says so rather than borrowing a release's name.

View Source
const ReleaseVersionPattern = `v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}` +
	`(-` + versionIdentifier + `(\.` + versionIdentifier + `)?)?` +
	`(\+` + versionIdentifier + `(\.` + versionIdentifier + `)?)?`

ReleaseVersionPattern is a release version of the shape the release workflow admits a tag in (.github/workflows/release.yml, "Refuse a tag that is not a vX.Y.Z release tag"), bounded: each number at most three digits, then an optional SemVer pre-release and an optional build part, each at most two dot-separated identifiers of at most twelve characters. The whole version is at most 64 characters, so the label carries a version and never a sentence. A tag outside the bound is not copied into a label: its build composes as a development build (labelVersion).

View Source
const Vendor = "abcd"

Vendor is the vendor half of the label: abcd itself, never a model's vendor.

Variables

This section is empty.

Functions

func ComposedValue

func ComposedValue(v string) string

ComposedValue is the trailer value a commit abcd composes carries, for a binary whose version is v.

func IsComposed added in v0.15.1

func IsComposed(value string) bool

IsComposed reports whether a trailer value is the label exactly as the gate accepts it: what ComposedValue writes for some version, and nothing else.

func IsModelValue

func IsModelValue(value string) bool

IsModelValue reports whether a trailer value is, whole, the model form the gate accepts.

func ModelHead

func ModelHead(value string) string

ModelHead is the model form a trailer value starts with, or "" when it starts with none: a conforming value whole, or the conforming head of a value that trails free text after it.

func NamesAbcd

func NamesAbcd(value string) bool

NamesAbcd reports whether a trailer value names abcd as its vendor, in any case and whatever follows. The gate refuses every such value that is not IsComposed, but each one claims abcd's provenance, so none is ever read as a model's vendor.

Types

type BodyFault added in v0.16.0

type BodyFault int

BodyFault is what the gate's body arm refuses a pull-request body for, the first it finds in the gate's own order.

const (
	// BodyClean: the gate accepts the body.
	BodyClean BodyFault = iota
	// BodyGeneratedFooter: a tool's "Generated with [...]" footer line.
	BodyGeneratedFooter
	// BodyCoAuthor: a Co-authored-by line, which asserts an authorship no tool
	// holds.
	BodyCoAuthor
	// BodyMalformedLabel: an Assisted-by line naming abcd in a form abcd never
	// writes.
	BodyMalformedLabel
	// BodyNoTrailer: no Assisted-by line in one of the three accepted forms.
	BodyNoTrailer
)

func JudgeBody added in v0.16.0

func JudgeBody(body string) BodyFault

JudgeBody judges a pull-request body as the gate's body arm does: fenced blocks stripped first, since a forge renders them as examples, then CR removed, then each line read on its own.

func (BodyFault) String added in v0.16.0

func (f BodyFault) String() string

Jump to

Keyboard shortcuts

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