我如何自动化Pivotal Tracker& Github集成? [英] How can I automate Pivotal Tracker & Github Integration?
问题描述
git commit -am'[#1234567] my new changes'
git push origin
会自动将注释我的新更改添加到1234567 Pivotal Ticket中,并使用github提交链接。
然而,,很容易忘记每次添加票证ID。如何简化/自动化?解决方案是使用Git-Hooks和功能分支。解决方案是使用Git-Hooks和功能分支。 (建议使用Github流)。
您必须安装此Git-Hook(将文件复制到本地存储库):
https://github.com/ktamas77/git_hooks
在您开始制作特定的Pivotal Ticket之前,您会创建一个以Pivotal Tracker ID为前缀的分支,例如:
git checkout 1234567_build_new_form
然后根据需要添加所有更改通常情况下:
git commit -am'表单添加'
git commit -am'添加风格'
git push origin
你会看到,git钩子脚本会自动提取Pivotal Tracker ID功能分支名称并将其添加到每个评论的前面。如果您愿意,您仍然可以手动覆盖它(带有另一个ID)。
通过这种方式,您不必担心为每次提交手动添加Pivotal ID 。它也适用于GUIS(比如GIT Tower),因为这些GUI使用标准的GIT库/可执行文件。
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
will add the comment 'my new changes' automatically to the 1234567 Pivotal Ticket among with the github commit link.
However, it's easy to forget to add the ticket ID each time. How could it be simplified / automated?
The solution is to use Git-Hooks and feature branches. (The Github-flow is recommended).
You have to install this Git-Hook (copy a file to your local repository):
https://github.com/ktamas77/git_hooks
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
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.
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& Github集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!