通过 Git 提交关闭 Jira 问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9979787/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Close Jira issue via Git commit
提问by Micky
Does anyone know if it's possible to change the status of a Jira issue using a Git commit? I am using Jira and Git with the Jira Git plugin and I know I can reference an issue by just adding the name in the commit but I thought a commit message like "ISSUE-1 #close" would set the status to closed. But this doesn't seem to work.
有谁知道是否可以使用 Git 提交更改 Jira 问题的状态?我正在将 Jira 和 Git 与 Jira Git 插件一起使用,我知道我可以通过在提交中添加名称来引用问题,但我认为像“ISSUE-1 #close”这样的提交消息会将状态设置为关闭。但这似乎不起作用。
Am I doing something wrong or is it not possible to send commands via the commit message?
我做错了什么还是无法通过提交消息发送命令?
采纳答案by Francis Martens
If you have FishEye installed you can use smart commitsto trigger various actions from a single commit.
如果您安装了 FishEye,您可以使用智能提交从单个提交触发各种操作。
回答by Nicolay77
Here is what you need to do to enable 'smart commits':
以下是启用“智能提交”所需的操作:
https://confluence.atlassian.com/display/AOD/Enabling+DVCS+smart+commits
https://confluence.atlassian.com/display/AOD/Enabling+DVCS+smart+commits
Then, the syntax to use in the commit messages:
然后,在提交消息中使用的语法:
<ISSUE_KEY> #<CMD> <optional CMD_PARAMETERS>
Example:
例子:
JRA-123 #resolve
More info on the syntax here:
有关此处语法的更多信息:
https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages
https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages