commit

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package commit provides conventional commit message parsing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BumpType

type BumpType = string
const (
	BumpNone  BumpType = "none"
	BumpPatch BumpType = "patch"
	BumpMinor BumpType = "minor"
	BumpMajor BumpType = "major"
)

func DetermineBump

func DetermineBump(commits []Commit) BumpType

type Commit

type Commit struct {
	Hash        string
	Type        string
	Scope       string
	Description string
	Body        string
	Footers     []Footer
	Breaking    bool
	Raw         string
}

func FilterByTypes

func FilterByTypes(commits []Commit, types []string) []Commit

func Parse

func Parse(hash, rawMessage string) Commit

Parse parses a raw commit message into a Commit. If the message does not follow the conventional commit format, it returns a Commit with an empty Type.

func (Commit) IsConventional

func (c Commit) IsConventional() bool
type Footer struct {
	Key   string
	Value string
}

Footer represents a conventional commit footer (e.g., "BREAKING CHANGE: description").

Jump to

Keyboard shortcuts

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