JIRA Smart Commit
The smart commit is basically an Integration between GITHUB and JIRA instance. This will help us to reduce duplicating the work of updating the JIRA comments and helps to track the corresponding changes from the particular JIRA ticket.
With the help of Smart Commit, You can:
• comment on issues
• record time tracking information against issues
• transition issues to any status defined in the JIRA Software project’s workflow.
Enable Smart Commit:
Follow the official JIRA documentation to enable Smart Commit:
Create Client ID and Secret:
Create the Client ID and Client Secret with Jira instance on your GITHUB organization.
• Go to your organization setting.
• Click “OAuth Apps” under “Developer settings”
• Then click “ NewOAuth Apps” on the right side of the page
• Provide the following details;
o Application name — Name of the application
o Homepage URL — Your JIRA instance URL
o Authorization callback URL — Your JIRA instance URL
• Click “Register application”.
Once you completed this, now the Client ID and Client Secret will be generated.
Smart Commit commands:
The basic command-line syntax for a Smart Commit message is:
<ignored text> <ISSUE_KEY> <ignored text> #<COMMAND> <optional COMMAND_ARGUMENTS>
Any text between the issue key and the Smart Commit command is ignored.
There are three Smart Commit commands you can use in your commit messages:
Adds a comment to a JIRA Software issue.
<ignored text> ISSUE_KEY <ignored text> #comment <comment_string>
JRA-34 #comment corrected indent issue
The committer’s email address must match the email address of a single JIRA Software user with permission to comment on issues in that particular project.
Records time tracking information against an issue.
<ignored text> ISSUE_KEY <ignored text> #time <value>w <value>d <value>h <value>m <comment_string>
JRA-34 #time 1w 2d 4h 30m Total work logged
This example records 1 week, 2 days, 4 hours and 30 minutes against the issue, and adds the comment
‘Total work logged’ in the Work Log tab of the issue.
• Each value for w, d, h and m can be a decimal number.
• The committer’s email address must match the email address of a single JIRA Software user with permission to log work on an issue.
• Your system administrator must have enabled time tracking on your JIRA Software instance.
Transitions a JIRA Software issue to a particular workflow state.
<ignored text> <ISSUE_KEY> <ignored text> #<transition_name> comment <comment_string>
Example JRA-090 #close #comment Fixed this today
This helps us to Develop faster saving time by manually providing the status in every JIRA ticket. It also helps the Program Manager to track the changes done for any ticket easily without requesting them offline to keep the ticket updated.