Documentation ¶
Overview ¶
Package gitMessage
Index ¶
- Constants
- func AppendCoauthorMarkup(newCoauthors []authors.Author, msgBytes []byte) ([]byte, []byte, error)
- func CommitTemplatePath() string
- func FormatCoAuthorList(coAuthorList []authors.Author) string
- func Path() string
- func Write(p string, coAuthorList ...authors.Author) error
- func WriteGitMessage(coAuthorList ...authors.Author) error
- type Source
Constants ¶
View Source
const (
EnvKeyGitMobMessagePath = "GITMOB_MESSAGE_PATH"
)
Variables ¶
This section is empty.
Functions ¶
func AppendCoauthorMarkup ¶
AppendCoauthorMarkup appends Co-Authored-By markup to a commit message
func CommitTemplatePath ¶
func CommitTemplatePath() string
CommitTemplatePath is ported from git-mob/src/git-message/index/commitTemplatePath
func FormatCoAuthorList ¶
FormatCoAuthorList takes a list of authors in the form "name <email>" and formats them as a newline-separated list of Co-authored-by tags
func WriteGitMessage ¶
Types ¶
type Source ¶
type Source int
const ( // comments from: https://git-scm.com/docs/githooks#_prepare_commit_msg UnknownSource Source = iota EmptySource // commit: source not provided MessageSource // commit-with-message: if a -m or -F option was given TemplateSource // commit-with-template: if a -t option was given or the configuration option commit.template is set MergeSource // merge-commit: if the commit is a merge or a .git/MERGE_MSG file exists SquashSource // squash-commit: if a .git/SQUASH_MSG file exists CommitSource // amending: followed by a commit object name (if a -c, -C or --amend option was given) )
Click to show internal directories.
Click to hide internal directories.