GitHub.com "Smart Commits"!

What is a Smart Commit?

For repositories created under the Department-of-Veterans-Affairs, Smart commits allow your team to perform actions on Jira issues from a single commit.  Users can enter the issue key and the desired action such as time tracking or closing an issue. The native Git Integration process supports smart commit by adding a simple syntax to a commit message.

You can:

  • comment on issues
  • record time tracking information against issues
  • transition issues to any status defined in the Jira Software project's workflow.

A Smart Commit command must not span more than one line (i.e. you cannot use carriage returns in the command), but you can add multiple commands to the same line.


Step-by-step guide

Follow these steps to begin using Smart Commits:

*Jira Project Admin: Prepare your Jira project by adding "VAjira Service" as a developer to your project.

  1. Send a request via the DOTS Service Desk with the repository name(s) for your project (https://jira.devops.va.gov/servicedesk/customer/portal/1)
  2. Once the connection confirmation is received from the DOTS team, test the connection with a commit:    

(Your commit messages must have your Jira ticket ID in the following syntax: #TICKETID)

  1. Example commit message:        

 git commit -m 'ABC-123 This is an example commit message, I am done!'



Here is an example of a Smart Commit comment in Jira:

 

Notes

Smart Commits only support the default Jira Software issue key format. This format is two or more uppercase letters, followed by a hyphen and the issue number, for example JRA-123. 

An Atlassian Guide on how to use Smart Commits, along with examples, is linked HERE. 

Learn more about using Smart Commits: Processing issues with Smart Commits.

Learn more about using Smart Commits: Linking Repositories