Documentation
¶
Overview ¶
Package person names the person running Physa. It prefers the person's setting, then their forge login (kept in the setting for next time), then the part of their git email before the "@". It never uses git's author name. Resolve runs no program: callers hand in the lookups, and ForRepo hands in the usual ones for a repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknown = errors.New("person unknown: no setting, no forge login and no git email")
ErrUnknown means no source named the person.
Functions ¶
func ConfigDir ¶
ConfigDir returns Physa's config directory, reading the environment through getenv.
func ForRepo ¶
func ForRepo(ctx context.Context, st proc.State, dir string, f forge.Forge, stderr io.Writer) string
ForRepo names the person running Physa in the repository at dir: their setting, else the login of the account f's forge signs them in as, else their git email. When no name can be had it says why on stderr, once, and returns "": the person is unknown, never guessed. st is the command's process state: its environment gives the setting's directory and is the one git runs in.
Types ¶
type Name ¶
type Name struct {
Name string
Source Source
// Kept says a forge login was written to the setting file.
Kept bool
}
Name is the resolved person.