SCM/VCS commands allow you to manipulate items is Sprint.ly and other interesting shortcuts via your SCM/VCS of choice commit messages (Currently Beanstalk, bitbucket, and GitHub are supported). There are a number of ways that you can manipulate items in your Sprint.ly products. For instance you can close tickets, reference/comment on tickets, and reopen tickets.
For those who are curious, a gist on how we do this can be found here.
Before you get started
- In order to do this you need to have post-receive hooks properly setup on your SCM/VCS service of choice (Beanstalk, bitbucket, or GitHub).
- Your SCM/VCS email address and Sprint.ly email address must match.
- All commands recognized by Sprint.ly are case insensitive (e.g. "Fixes", "fixes", "FiXeS" will all work the same).
- All commands require an item number to work. The command will be ran against the item referenced in the commit message.
- You can issue a single command on multiple item numbers. See the section Manipulating multiple items in a single command below.
Working with SCM/VCS commands
Finding your item's number
You can easily find your item's number by hovering over it and looking underneath the circular estimator. You can find the item number in the URL of the permalink of a given item. If your item's permalink is
https://sprint.ly/product/1/item/12, it's item number would be
12. Sprint.ly looks for ticket numbers that have a pound/hash sign in front of them, such as
Manipulating multiple items in a single command
You may issue a command to multiple items by separating item numbers with a comma. For instance, you could close three tickets from a single commit message with
git commit -m 'Finished cleaning up those models and adding an admin site. Fixes #1, #2, and #3.
Here's a few more examples:
Added blah to blah. Fixes #1.
Added blah to blah. Fixes #1 and #2.
Added blah to blah. Added foo to baz. Fixes #1, #4, and #2.
NOTE: Item numbers are unique, auto-incrementing per product. This means that "Product A" and "Product B" can both have an item #1.
Executing multiple commands in a single commit
You can also execute multiple commands in a single commit. There isn't really any limit to this ability with the exception that each command will only be executed on a single ticket once. Below is an example.
$ git commit -m 'Added blah to foo and ripped out baz. Fixes #55. Reopens #33. Refs #4'
Closing a ticket
From your commit message you can simply append
Fixes #12 and Sprint.ly will mark it as complete. This will not mark the ticket as accepted.
$ git commit -m 'Added a new field to the Blog model and setup South migrations. Fixes #55.'
Referencing a ticket
Sometimes you wish to attach some notes from a commit message to an item without manipulating it. This is what Sprint.ly refers to as referencing an item. It will not do anything to the item other than append your note in the comments area.
$ git commit -m 'Added a minified jQuery to `/static` and set up [http://daringfireball.net/projects/markdown/syntax](Markdown). References #88.'
Reopening a ticket
Le sigh the horror of having to reopen a ticket and work on that boring code again. We feel your pain. Luckily, we've taken some of the pain out of it by allowing you to do it via your SCM/VCS of choice.
$ git commit -m "Backed out some code that wasn't fully baked that is now breaking. Unfixes #55."
Alternate Ticket Syntax
We also offer different syntax for tickets, if you're trying to integrate with other tools (e.g. Github Issues). You can reference tickets in any of the following ways:
#44 ticket:44 issue:44 item:44 bug:44