Skip to content

Instantly share code, notes, and snippets.

@leesmith
Created December 31, 2011 06:05
Show Gist options
  • Star 36 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save leesmith/1543080 to your computer and use it in GitHub Desktop.
Save leesmith/1543080 to your computer and use it in GitHub Desktop.
Pivotal Tracker post-commit message syntax
https://www.pivotaltracker.com/help/api?version=v3#github_hooks
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax
SCM Post-Commit Message Syntax
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321:
[#12345677 #12345678] Diverting power from warp drive to torpedoes.
...it will result in the following comment being added to Tracker stories 12345677 and 12345678, and the stories will be started if they were not yet started:
Commit: Scotty
54321
[#12345677 #12345678] Diverting power from warp drive to torpedoes.
To automatically finish a story by using a commit message, include "fixed", "completed" or "finished" in the square brackets in addition to the story ID. You may also use different cases or forms of these verbs, such as "Fix" or "FIXES", and they may appear before or after the story ID. Note: For features, this will put the story in the 'finished' state. For chores, it will put the story in the 'accepted' state. For example:
[Fixes #12345678] Torpedoes now sufficiently powered.
In some environments, code that is committed is automatically deployed. For this situation, include "delivers" and the story will be put in the 'delivered' state:
[Delivers #12345679] Scotty can beam up Captain Kirk.
@SeanLower
Copy link

Old, but awesome. Thanks!

@OKNoah
Copy link

OKNoah commented Feb 3, 2015

@SeanLower is there newer/added syntax?

@getaaron
Copy link

getaaron commented Feb 3, 2015

Is there syntax for accepting a story?

@stevenvachon
Copy link

Can multiple be used?:

[finished #1234] asdf1
[#12345] asdf2

@leotm
Copy link

leotm commented May 30, 2016

@stevenvachon Yes! [#12345677 #12345678] is fine too.

@leotm
Copy link

leotm commented May 30, 2016

@getaaron Not at the moment. Likely due to the workflow of testing after it's delivered (by others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment