commit

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAuthorList

func BuildAuthorList(all []string, current string) []string

BuildAuthorList deduplicates all (may contain duplicates), sorts alphabetically, then prepends current as the first entry (removing it from its sorted position if present). If current is empty, the sorted deduplicated list is returned as-is.

func FillOutForm

func FillOutForm(cfg *config.AppConfig, defaults tui.CommitOption, hint IssueHint) ([]byte, tui.CommitOption, error)

FillOutForm presents the commit TUI form. Group 1: type select + commit message fields (scope, subject, body, footer). Group 2: commit options (author, all, amend, no-verify, signoff, allow-empty).

Group 2 is skipped when defaults.AnyOptionSet() is true (flags were passed).

The hint pre-populates one message field and pre-selects the commit type when it matches a configured type. Zero hint = no pre-population.

Returns the assembled commit message bytes and the (possibly user-modified) options.

Types

type IssueHint added in v0.6.0

type IssueHint struct {
	IssueID    string
	BranchType string
}

IssueHint carries issue context detected from the current branch. Zero value means no issue branch — form fields are left unchanged.

Jump to

Keyboard shortcuts

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