|
|
|
|
|
by Gazler
4231 days ago
|
|
Glad it made sense! So the match is exact between the non %{..} characters. The idea for scope is the context of the commit, in my libraries I use the name of the class as the scope. For example with the default format string: test string: "fix(User): ensure email address is required"
format: "%{type}(%{scope}): %{description}"
[type: "fix", scope: "User", description: "ensure email address is required"]
So any literal characters are matched exactly and anything inside the capturing %{...} is assigned to that variable.This does fall over in the following case: "fix():(User): ensure email address is required"
"%{type}(%{scope}): %{description}"
[type: "fix", scope: "):(User", description: "ensure email address is required"]
It is certainly a candidate for improvement in the future. |
|