Changex.SubjectSplitter (changex v0.3.0)

This module is used to split the subject of a commit message based on a format passed in.

Link to this section Summary

Functions

Split the subject based on the format.

Link to this section Functions

Link to this function

get_parts(subject, format)

Split the subject based on the format.

examples

Examples

iex> subject = "fix(user): ensure email is required"
iex> format = "%{type}(%{scope}): %{description}"
iex> Changex.SubjectSplitter.get_parts(subject, format)
[type: "fix", scope: "user", description: "ensure email is required"]