Link SVN commits to issues

南笙酒味 提交于 2020-01-06 05:07:21

问题


I know I can use #number to to link the commit to an issue. But I'm looking for a way to change the issue status through the svn commit.

I'm looking for something similar to what Trac have http://trac.edgewall.org/wiki/TimeTracking . If your svn comment is "This task is almos done (refs 123)" then it add the message on the issue's log.

Does anybody knows if there is a way to do it?


回答1:


Looks like this is in redmine OOTB:

I'm looking for a way to change the issue status through the svn commit.

You can update the issue status by using the proper Referencing keywords as defined in your settings. See the redmine wiki or the answer to this question on SO (screenshot below)

If your svn comment is "This task is almos done (refs 123)" then it add the message on the issue's log.

When using the proper Referencing keywords in your svn message (as above), the revision gets associated to the issue and is being displayed in a second column called Associated revisions to the right of the message History (see this issue as an example).

In case you use Fixing keywords , an entry is also added to the issue's log, the status is modified and the % Done field is updated.





回答2:


Referencing issues in commit messages When fetched from the repositories, commit messages are scanned for referenced or fixed issue IDs. These options lets you define keywords that can be used in commit message to reference or fix issues automatically, and the status to apply to fixed issues.

Default keywords are:

for referencing issues: refs, references, IssueID for fixing issues: fixes, closes There's no default status defined for fixed issue. You'll have to specify it if you want to enable auto closure of issues. If you want to reference issues without using keywords, enter a single star: * in the Referencing keywords (Administration/Repository) setting. In this case, any issue ID found in the message will be linked to the changeset.

Example of a working commit message using default keywords:

This commit refs #1, #2 and fixes #3 This message would reference issues 1 and 2 and automatically fix issue 3. After a keyword issue IDs can be separated with a space, a comma or &.




回答3:


  • In case of TortoiseSVN you have to find, install, configure proper plugin for your issue-tracking tool

  • For command-line SVN (I suppose), most things can be done with post-commit hooks



来源:https://stackoverflow.com/questions/7615571/link-svn-commits-to-issues

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!