File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments