-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simen Mailund Svendsen
committed
Jan 28, 2024
1 parent
86b41d8
commit c8e0f02
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# git jira autokey | ||
|
||
A common request from clients is that each commit is tagged with the jira issue key for the feature I am working on. | ||
This is very easy to forget, so it is better to automate it. | ||
|
||
## demo | ||
```shell | ||
$ git branch --show-current | ||
feature/ISSUE-1337-the-key-should-always-be-included-in-commit-message | ||
$ git add src/main.rs | ||
$ git commit -m "issue key will be added automatically now" | ||
[feature/ISSUE-1337-the-key-should-always-be-included-in-commit-message 699c022] [ISSUE-1337] issue key will be added automatically now | ||
1 file changed, 1 insertion(+) | ||
$ git log -n 1 | ||
commit 699c02224787ee1fc08afc6edeaa75f50df2ff58 (HEAD -> feature/ISSUE-1337-the-key-should-always-be-included-in-commit-message) | ||
Author: Author name <[email protected]> | ||
Date: <date> | ||
|
||
[ISSUE-1337] issue key will be added automatically now | ||
|
||
|
||
``` | ||
|
||
## usage | ||
`cargo build --release` | ||
|
||
move the binary to your global git hooks folder and rename to `commit-msg` |