Documentation
¶
Overview ¶
Package commit parses Conventional Commit messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasSkipChangelogTag ¶
HasSkipChangelogTag reports whether message contains a "[skip changelog]" tag, case-insensitive and anywhere in the message text — the same "[skip ci]"-style convention CI systems use, so it works in a single-line "git commit -m" without needing a footer trailer. This is a fixed, non-configurable literal, unlike cfg.SkipChangelogTrailer's footer key.
Types ¶
type PRReference ¶
PRReference is a pull/merge request number resolved directly from commit message text (see ADR-0001). Link is only populated when the text itself carried a full URL (Gitea/Forgejo's "Reviewed-on:" trailer) — GitHub's "(#N)" squash suffix carries no URL, so Link stays empty for that form; a canonical link for it comes from the live API lookup (ticket 08), not from guessing a URL out of thin air here.
func ExtractPRReference ¶
func ExtractPRReference(message string) (PRReference, bool)
ExtractPRReference looks for a PR reference embedded directly in a commit's message text: GitHub squash-merge's "(#N)" title suffix, or Gitea/Forgejo squash-merge's "Reviewed-on: .../pulls/N" footer trailer. ok is false when neither form is present — callers attach no reference rather than guessing one (ADR-0001).
type ParsedCommit ¶
ParsedCommit is the structured form of a Conventional Commit header.
func Parse ¶
func Parse(message string) (parsed ParsedCommit, ok bool)
Parse reads a commit message's header line as a Conventional Commit. ok is false when the header doesn't match the Conventional Commits grammar — callers drop such commits rather than guessing at their meaning (ADR-0003).