Skip to main content
Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Jira Smart Commits

Smart commits allow your team to perform actions on Jira issues from a single commit.

What is a Smart Commit?

Users can enter the issue key and the desired action such as time tracking or closing an issue. The VAEC 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. Atlassian’s Guide on how to use Smart Commits, along with examples, is linked HERE.

GitHub Jira Integration

Steps to begin using Smart Commits on VAEC GitHub Enterprise Server

* Jira Project Admin: Prepare your Jira project by adding “VAjira Service” as a developer to your project. bot VAJira service

  1. Create the webhook in your repository.
    • Navigate to your repository and go to Settings -> Hooks and click “Add webhook”
  2. Please see the following guide for the “Payload URL” information:
  3. Click the radio button “Let me select individual events.”
  4. Only check the “Pushes” event, and nothing else.
  5. Click “Add webhook”
  6. Test the connection with a commit: (Your commit messages must have your Jira ticket ID in the following syntax: [#TICKETID] )
  7. Example commit message: git commit -m '[#ABC-123] This is an example commit message, I am done!'

Steps to begin using Smart Commits on GitHub Enterprise Cloud

To integrate a Jira Project with a GitHub repository within the Department of Veterans Affairs organization submit a DOTS ticket with name of the Jira Project and GitHub repository URL.

Once the DOTS ticket is closed, users can simply reference the Jira ticket ID in the commit message, issue title, or pull request title for them to be linked as outlined here.

In order for your Jira references in GitHub to show as links, a GitHub repository administrator will need to do the following:

  1. Navigate to the settings of the repository
  2. Select Autolink references in the right menu pane Autolink references
  3. Fill in the Jira project Key in the Reference prefix field
  4. Fill in the Jira URL for browsing a Jira ticket in the Target URL field
  5. Select Add autolink reference
  6. Any linked Jira issues will now become hyperlinks in the repository’s commit messages, issues, and pull requests. Linked Jira Issues

Here is an example of what a Smart Commit comment in Jira looks like: Jira Example

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.

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

Learn more about using Smart Commits: Linking Repositories


Return to Guides