如何使Pivotal Tracker& amp;Github集成? [英] How can I automate Pivotal Tracker & Github Integration?

查看:51
本文介绍了如何使Pivotal Tracker& amp;Github集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Pivotal Tracker和Github集成度很高:设置完成后,每个以Pivotal Tracker ID为前缀的提交都会自动出现在相应的Pivotal Ticket下面,例如:

Pivotal Tracker and Github have great integration: Once it's set up, each commit which is prefixed by the Pivotal Tracker ID will appear under the corresponding Pivotal Ticket automatically, for an example:

git commit -am '[#1234567] my new changes'
git push origin

将自动添加注释我的新更改"以及github提交链接到1234567 Pivotal Ticket.

will add the comment 'my new changes' automatically to the 1234567 Pivotal Ticket among with the github commit link.

但是,很容易忘记每次都添加票证ID.如何简化/自动化?

However, it's easy to forget to add the ticket ID each time. How could it be simplified / automated?

推荐答案

解决方案是使用Git-Hooks和功能分支.(建议使用Github-flow).

The solution is to use Git-Hooks and feature branches. (The Github-flow is recommended).

您必须安装此Git-Hook(将文件复制到本地存储库):

You have to install this Git-Hook (copy a file to your local repository):

https://github.com/ktamas77/git_hooks

在开始处理特定的Pivotal Ticket之前,请创建一个以Pivotal Tracker ID为前缀的分支,例如:

Before you start working on a particular Pivotal Ticket, you create a branch prefixed with the Pivotal Tracker ID, for an example:

git checkout 1234567_build_new_form

然后像平常一样添加所有更改:

then add all your changes as you'd do normally:

git commit -am 'form added'
git commit -am 'styles added'
git push origin

您将看到,git hook脚本将自动从功能分支名称中提取Pivotal Tracker ID,并将其添加到每个注释的前面.如果需要,您仍然可以手动覆盖它(使用另一个ID).

you'll see, the git hook script will automatically extract the Pivotal Tracker ID from the feature branch name and add it to the front of each comment. You can still manually override it (with another ID) if you want.

通过这种方式,您不必担心为每个提交手动添加Pivotal ID.由于这些GUI使用标准的GIT库/可执行文件,因此它也可以与GUIS(例如GIT Tower)一起使用.

In this way you don't have to worry about adding the Pivotal ID manually for every single commit. It also works with GUIS (such as GIT Tower) since these GUIs are using the standard GIT libraries / executables.

这篇关于如何使Pivotal Tracker& amp;Github集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆