简体   繁体   中英

How to make Git commit history show up at Redmine issue tracker

I followed the instruction of this article and setup an Redmine site on my DreamHost account with Git repository.

It works fine so far, I could manage my project using Redmine, and commit my code to the Git repository using SSH, and I could browse my source code and commit history using Redmine user interface.

But there is my problem: It does not hook Git commit history with issue tracker like the official Redmine site.

For example, there is a commit log listed on http://www.redmine.org/issues/7000 .

But in my case, I created a ticket which is numbered by Redmine as #5, and I created a commit log like the following:

commit 580fdb33877d7b4167863f5138973b7a83b352aa
Author: Brian Hsu <XXXX.XXXX@gmail.com>
Date:   Fri Mar 11 11:43:43 2011 +0800

    Add README file. (#5)

commit 9cf0d98a319ffca501dc541c76a6cff9a32d6146
Author: Brian Hsu <XXXX.XXXX@gmail.com>
Date:   Fri Mar 11 11:40:00 2011 +0800

    Inital commit.

I could see these commit in the source code browser in version control tab and click "#5" to go to the issue #5. But in that ticket, it does not show the commit log of 580fdb33877d7b4167863f5138973b7a83b352aa in that ticket.

So how could I hook Git and Redmine issue tracker?

BTW, I followed the master/develop two branch workflow mentioned by " A successful Git branching model ", so I would like Redmine to hook the commit in develop branch instead of master.

Thanks.

Sorry, my fault.

There are keywords to associate the commit history with issue tracker tickets listed on the page http://yourredminesite/settings/edit?tab=repositories

Change my commit log with "refs #5" and it works.

I'm new to Redmine but AFAIK you should be able to just use '#', eg #5 as the reference. Then the commits mentioning the reference ID should show up in the issue.

See Redmine - Defect #7593 that seems to cover this issue, although the ticket is closed.

In summary they recommend using '*' in your list of keywords (logon as Redmine Admin user - then navigate to Administration/Settings/Repositories/Referencing keywords). The OP the comments that he had to delete and re-add the git repository to the Redmine project to trigger reparsing of the commit comments so the issues were updated with the correct links.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM