Question

I'm looking for a task management tool that would allow me to do something that seems really obvious to me: link a task/issue to a specific part of my code (using Git).

Here is an example of what I'm expecting from this tool :

  • I click on "new task"
  • In the task creation, I can set the title, the description...AND the file/line in my current git repository.
  • Once the task is created, I can see exactly where I have to look in my code to achieve it.

I watched Redmine, Mantis, Trac, etc.. but I'm not sure they can make it. The answer is probably somewhere on Google but I'm not sure to use relevant keywords to find it :( Note that I already use github.

Thanks for your help.

Was it helpful?

Solution

If your code is in GitHub you can easily link directly to a line of code, e.g.

https://github.com/git/git/blob/master/Makefile#L449

The easiest way to generate this link is to browse to the appropriate revision and file using the web interface and click in the margin on the line number you want to reference. Your address bar should update. Copy and paste.

Ranges are also supported:

https://github.com/git/git/blob/master/Makefile#L451-L466

To generate these, click the first line number, then shift-click the second.

These links can be used in their own Issues system, or any other issue tracker that supports external HTML links.

If you want to embed code in your tickets, you could experiment with gist-it.

Example:

<script src="http://gist-it.appspot.com/github/git/git/blob/master/Makefile?slice=451:466"></script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top