Linking Commits to Issues

Linking Commits to Issues

  • Comments 8

Just a quick post to let you know that we recently added support for linking issues to commits in CodePlex using the same #1234 syntax being used in TFS 2013.

Screenshot of SvnBridge project showing a work item link using the #1234 syntax

Basically, if you insert a ‘#’ symbol followed by an integer in your commit statement, changeset comment or pull request comments then this will render as a link to the work item when displayed in the browser. We’ll be expanding on the work item grammar so I’m interested in what you think – I notice that the NuGet team quite often mention “Work Item: 1234” or “Issue 1234” when talking to work items so looks like we should probably expand the detection to use that pattern. If there are other ways that you find yourselves working already then let me know in the comments.

Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post
  • Good idea

  • Thank you. I've been using this syntax (being a contributor on a few GitHub repos) for a while and I see you automatically linked old commit messages.

    What would be even better is if the work item was updated with link(s) to any commit(s) that reference it. This way, the bug opener (or other interested parties) can see which commits to pull down or otherwise take a look at.

    Keep up the good work!

  • Specifying "Work Item: 1234" automatically resolves and adds a comment to work items when the commit is pushed.

    See blogs.msdn.com/.../work-item-keyboard-shortcuts-resolving-mercurial-work-items-wikiplex-2-0.aspx and svnbridge.codeplex.com/wikipage

  • With the on-premises product, I usually use "...Bug 1234..."

  • Nice update, I wonder why you don't tweet about it?

  • Highlighting Links -

    Literally 10 minutes before I saw this post I did a commit where I included the entire link to the issue (E.g. peerly.codeplex.com/.../3). I was surprised that wasn't automatically highlighted in the commit list as a link (e.g. peerly.codeplex.com/.../changesets).

    Reverse Links -

    What about automatic links from issues to commits? In fact the way I found this post is that I was closing an issue because the commit resolved it and I couldn't figure out how to automatically link the two and it seemed silly to include the commit link (e.g. peerly.codeplex.com/.../ce0172477affc6a3bb74edbdbc409fc7b98293df) in the issue manually. So what about automatic backward linking? If a commit links to an issue then shouldn't the issue automatically show a link back to the commit?

    In any case this is a useful feature, thanks!

  • I've been using "issue 1234" so it would be great if that pattern could be detected

  • We typically use the number at the start of a line, followed by the issue description. Easy enough to change to adding the # at the start, but it would be nice for our history if lines starting with a number could be detected.

    +1 for links being added from the issue back to the commit. One of our team does a lot of this manually, so he'll probably +100...

Page 1 of 1 (8 items)