User Guide

Smart Commits

Smart Commits let developers update Jira issues directly from a commit message - no need to open Jira separately.

Smart Commit Format

<ISSUE-KEY> <ignored text> #<command> <command-arguments>

Example:

PROJ-123 Fix null pointer exception #comment Fixed by checking for null before dereferencing #time 1h #resolve

Supported Commands

CommandWhat It DoesExample
#commentAdds a comment to the issue#comment Reviewed and merged
#timeLogs work against the issue#time 2h 30m
#<transition-name>Transitions the issue using a workflow transition name (e.g. #resolve, #close, #in-progress)#resolve

Multiple commands can be combined in a single commit message.

Requirements

  • The repository must be connected to GitConnect for Jira and finished its initial sync
  • The commit message must include a valid Jira issue key that exists in a project the app has access to
  • The Jira user associated with the commit's email address (if one is found) is used for the comment author and time logging; otherwise the action is attributed to the integration

Note: Workflow transition commands only work if a transition with that name exists on the issue's current workflow status. If no matching transition is found, the transition command is ignored but any #comment or #time commands in the same message still run.

When Jira Development Information Is On

When Send Development Information to Jira Cloud is on in App settings (the default), GitConnect sends commits to Jira and Jira's own Smart Commit engine runs the commands, as the commit author. GitConnect does not run them a second time, so comments and work logs are never added twice.

In this mode:

  • The commit author's email address must match a Jira user, and that user needs permission to comment, log work, or transition the issue. If there is no match, Jira does not run the commands

When the setting is off, GitConnect runs Smart Commits itself, as described above. See Jira Development Panel & Automation.