commit

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Config  Config
	Emoji   string
	Summary string
	Body    string
	Footer  string
	Author  repository.User
	Options Options
	Applier func(c repository.Commit, opts ...repository.CommitOptions) error
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*Commit, error)

func (*Commit) Apply added in v0.3.0

func (c *Commit) Apply() error

func (*Commit) EmojiSummaryToSubject added in v0.3.0

func (c *Commit) EmojiSummaryToSubject() string

func (*Commit) UserToAuthor added in v0.3.0

func (c *Commit) UserToAuthor() string

type Config

type Config struct {
	Placeholders Placeholders
	Repository   repository.Description
	Emojis       []emoji.Emoji
	Emoji        emoji.NullEmoji
	Summary      string
	Body         string
	Amend        bool
}

func (*Config) MessageToBody added in v0.3.0

func (c *Config) MessageToBody() string

func (*Config) MessageToEmoji added in v0.3.0

func (c *Config) MessageToEmoji() emoji.NullEmoji

func (*Config) MessageToSummary added in v0.3.0

func (c *Config) MessageToSummary() string

type Options added in v0.1.1

type Options struct {
	Apply bool
	Amend bool
}

type Placeholders added in v0.2.0

type Placeholders struct {
	Hash    string
	Summary string
	Body    string
}

Jump to

Keyboard shortcuts

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