onlynone
onlynone

Reputation: 8339

Exact format of JIRA smart commits

I've read through:

https://confluence.atlassian.com/fisheye/using-smart-commits-298976812.html

And I understand how a commit message like:

This is the subject line

This is the body. There might be several lines here
as per good git commit message formatting.

ABC-1234 #close All fixed

Would close the jira issue ABC-1234 with the message "All fixed".

But what is the exact format required for these smart commits to work? Would a line in a commit message like the following work:

[ABC-1234] #close All fixed

What about a line that doesn't start with the ISSUE_KEY, would the following work:

Jira-Smart-Commit: ABC-1234 #close All fixed

Is there some place I could get an exact definition of what will work?

Upvotes: 2

Views: 2175

Answers (2)

anand krish
anand krish

Reputation: 4415

Syntax:

<ignored text> ISSUE_KEY <ignored text> #comment <comment_string>
Changes for JIRA Id LOANDEV-165320 #comment:Initial Commit for Employee Project

reference here

Upvotes: 0

Gene Taylor
Gene Taylor

Reputation: 631

the format for a smart commit is as follows

  <ignored text> <ISSUE_KEY> <ignored text> #<COMMAND> <optional COMMAND_ARGUMENTS>

so you dont need to put the issue key at the start of the line.

We are currently in the process of revamping the documentation, so you may find more information there than the last time you look

https://confluence.atlassian.com/display/FISHEYE/Using+smart+commits

Upvotes: 2

Related Questions