What is your workflow to coordinate Pivotal Tracker with Mercurial?
Asked Answered
B

2

6

I want to use Pivotal Tracker for a new project but I don't know how to use it with Mercurial to make it easy to go from one tool to the other.

What workflow do you use to link user stories/feature in Pivotal Tracker with your DVCS (Mercurial/Git)?

Thanks in advance for your advices.

Bookkeeping answered 19/4, 2010 at 15:2 Comment(4)
Did you find or develop hooks for Mercurial and Pivot Tracker? I would be interested, if so.Aerography
Found this...didn't look at it in detail. gist.github.com/105261Aerography
Look nice! I will try if I can adapt this script for Pivotal Tracker. Thanks.Bookkeeping
So, how did it turn out in the end. Did you make a Mercurial hook for PT?Kiernan
P
8

If someone is still looking for an answer, there exists a service which allows mercurial users to connect to pivotal tracker using a syntax like [#story_id finished] in their commit messages. Bitbucket allows for this integration as well.

Links: https://bitbucket.org/proppy/hgpivotal/src/tip/hgpivotal.py

Note from Pivotal Tracker on the format:

The minimum commit message string that will allow Tracker to associate a source_commits POST with a story and create a comment is a single story ID enclosed in square brackets: '[#12345678]'. A more typical message, indicating that one commit completes two stories (which need not be in the same Tracker project), might look like this: 'finally [finished #12345678 #12345779], fixes client/server integration glitch'

If an included story was not already started (it was in the "not started" state), an update to that story from /source_commits that doesn't contain any other state-change information will automatically start the story.

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 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, use of one of these keywords will put the story in the finished state. For chores, it will put the story in the accepted state.

In some environments, code that is committed is automatically deployed. For this situation, use the keyword "delivers" and feature stories will be put in the delivered state.

Phrygia answered 4/9, 2011 at 10:14 Comment(2)
Excellent! Much better than my post-commit hook. +1Fash
Thanks for showing the syntax! Not even bitbucket mentions it exactly.Espouse
F
1

You should use Post-Commit Hooks to link the two tools:

The Tracker API supports integration with post-commit hooks of Source Control Management (SCM) systems such as Subversion, Git, etc.
When a commit is made to the SCM, a trigger can call the Tracker API to add a story comment with the commit ID, author and message. It can also optionally change the story state.

Those hooks exists for Git, and should be written for Mercurial.

Fash answered 19/4, 2010 at 15:51 Comment(1)
I can't find an existing hook for Mercurial to link with PT. I will have to do one myself... Thanks for the hint!Bookkeeping

© 2022 - 2024 — McMap. All rights reserved.