JIRA-GIT 智能提交

2018-04-13  本文已影响0人  Monsty

准备

为 GIT 仓库配置用户名和邮箱

cd /path/to/your/repo
echo '[user]' >> .git/config
echo 'name = 你的名字 >> .git/config
echo 'email = xxx@yingyinglicai.com' >> .git/config

JIRA 智能提交

命令格式

<ignored text> <ISSUE_KEY> <ignored text> #<COMMAND> <optional COMMAND_ARGUMENTS>

评论

添加一条评论到 JIRA 的问题

语法

<ignored text> <ISSUE_KEY> <ignored text> #comment <comment_string>

例子

git commit -m 'JRA-34 #comment 添加评论'
git push

注意 :提交人的邮件必须在 JIRA 项目里有评论权限。

修改工作流

改变 JIRA 问题到某个状态

语法

<ignored text> <ISSUE_KEY> <ignored text> #<transition_name> <comment_string>

例子

git commit -m 'JRA-090 #close 问题结束'
git push
上一篇 下一篇

猜你喜欢

热点阅读