Git Commands

Introduction

If any of your projects use a Git repository, you can use Git commits to automatically update any work item in your portal. With Aiveo's Git commit commands you can:

  • Log time to a work item
  • Change the state of a work item
  • Change the assignee of a work item
  • Comment on a work item

Aiveo supports Git commands for the following services:

  • Bitbucket
  • GitHub
  • GitLab

Setup

In order to setup your portal for Git commands, follow the steps below.

  1. Go to Portal > Settings
  2. Click "Generate" to create a new app secret for your portal
  3. Copy either the Bitbucket, GitHub, or GitLab URL, depending on the repository you would like to integrate with
  4. Click Save
  5. Use the URL you copied from step 3 to setup webhooks in Bitbucket, GitHub or GitLab. You can find instructions on how to do this at Bitbucket Webhooks, GitHub Webhooks, or GitLab Webhooks

Once your portal is setup for Git commands, each user should setup their aliases so that Aiveo can identify them when processing git commands. To setup an alias, follow the steps below.

  1. Go to your account settings by clicking on your name in the top right, then clicking Account
  2. Enter in your Bitbucket username, Github username, or GitLab email address into the Alias entry field.
  3. Click Save

That's it! Your portal should now be ready to accept commands from Git repositories.

Command Syntax

Git commands use the following commit message syntax.

<Ignored text>
[Work Item ID] [-c <comment>] [-t <time in hours to log>] [-s <state to change work item to>] [-a <email address of assignee>]

All of the arguments (-t, -s, -a, and -c) in the command are optional and can be included in any order.

Examples

Commenting on a work item

The following Git commit message will add a comment to the work item ACME-555

Fixed the bug
ACME-555 -c This will be fixed in version 2.5.2

Logging time to a work item

The following Git commit message will log 2.5 hours to the work item ACME-321

Partially implemented feature
ACME-321 -t 2.5

Multiple changes to a work item

The following Git commit message will log time, add a comment, change the state, and change the assignee of the work item ACME-123

Changed some files
ACME-123 -c This is ready for review. -s In QA -t 1.5 -a [email protected]