GitOps.Commit (Git Ops v2.8.0)

View Source

Manages the structure, parsing, and formatting of commits.

Using parse/1 you can parse a commit struct out of a commit message

Using format/1 you can format a commit struct in the way that the changelog expects.

Summary

Functions

Formats the author information as a GitHub username. If a GitHub username is provided, uses that with @ prefix. If the email is a GitHub noreply email, extracts the username. Otherwise, just uses the author name.

Types

t()

@type t() :: %GitOps.Commit{
  author_email: term(),
  author_name: term(),
  body: term(),
  breaking?: term(),
  footer: term(),
  github_user_data: term(),
  message: term(),
  scope: term(),
  type: term()
}

Functions

breaking?(commit)

feature?(commit)

fix?(commit)

format(commit)

format_author(name, email, arg3)

Formats the author information as a GitHub username. If a GitHub username is provided, uses that with @ prefix. If the email is a GitHub noreply email, extracts the username. Otherwise, just uses the author name.

parse(text, author_info \\ nil)