Skip to content

Commit

Permalink
Merge pull request #267 from sebastianlarisch
Browse files Browse the repository at this point in the history
adjust documentation for new pattern option
  • Loading branch information
sebastianfeldmann authored Jan 16, 2025
2 parents 7c5a02f + 3b9edac commit c00a47d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ <h4 id="msg-issue-key">Inject issue key into your commit message</h4>
<p>
Extracts an issue key from the current branch name and appends or prepends it to your commit messages
subject or body. If the commit message already contains the key nothing is added. If you set the <em>force</em>
option to <em>true</em> it will fail if no issue key can be extracted.
option to <em>true</em> it will fail if no issue key can be extracted. You can optionally use a <em>pattern</em>
if you want to add a delimiter or another character.
</p>
<pre><code class="javascript">{
"action": "\CaptainHook\App\Hook\Message\Action\InjectIssueKeyFromBranch",
"options": {
"regex": "#([A-Z]+\\-[0-9]+)#i",
"into": "body",
"mode": "append",
"pattern": "$1:",
"prefix": "\\n\\nIssue: ",
"force": false
}
Expand Down

0 comments on commit c00a47d

Please sign in to comment.