Skip to content

Commit c00a47d

Browse files
Merge pull request #267 from sebastianlarisch
adjust documentation for new pattern option
2 parents 7c5a02f + 3b9edac commit c00a47d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

actions.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,16 @@ <h4 id="msg-issue-key">Inject issue key into your commit message</h4>
150150
<p>
151151
Extracts an issue key from the current branch name and appends or prepends it to your commit messages
152152
subject or body. If the commit message already contains the key nothing is added. If you set the <em>force</em>
153-
option to <em>true</em> it will fail if no issue key can be extracted.
153+
option to <em>true</em> it will fail if no issue key can be extracted. You can optionally use a <em>pattern</em>
154+
if you want to add a delimiter or another character.
154155
</p>
155156
<pre><code class="javascript">{
156157
"action": "\CaptainHook\App\Hook\Message\Action\InjectIssueKeyFromBranch",
157158
"options": {
158159
"regex": "#([A-Z]+\\-[0-9]+)#i",
159160
"into": "body",
160161
"mode": "append",
162+
"pattern": "$1:",
161163
"prefix": "\\n\\nIssue: ",
162164
"force": false
163165
}

0 commit comments

Comments
 (0)