text

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package text contains functions to parse Git Commit texts and some basic helpers for identifying type of commit by its message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMessageTitle

func CheckMessageTitle(commit quoad.Commit, strict bool) error

CheckMessageTitle verifies that the message title conforms to conventional commit standard https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary

func FormatFailingCommits

func FormatFailingCommits(commits []FailingCommit) table.Writer

FormatFailingCommits takes in slice of commit hashes and messages and formats it for nice output

func IsInitialCommit

func IsInitialCommit(commitMessage string) bool

IsInitialCommit checks if a commit needs to be filtered, because it is the init commit of any given repo

func IsMergeCommit

func IsMergeCommit(message string) bool

IsMergeCommit tests message string against expected format of a merge commit and returns true/false based on it

Types

type FailingCommit

type FailingCommit struct {
	Hash    string
	Message string
	Error   error
}

FailingCommit is just a formatted commit struct

Jump to

Keyboard shortcuts

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