Search code examples
gitjiraatlassian-fisheye

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?


Solution

  • 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