在GitHub repo中显示Travis构建状态 [英] Showing Travis build status in GitHub repo

查看:800
本文介绍了在GitHub repo中显示Travis构建状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我记得最近看到Travis在GitHub浏览存储库中的pr或commit的构建状态(..但不能在哪里)。我不是在说README.md中的Travis构建状态图像,而是一个实际的GitHub功能(带有友好复选标记的绿色框)。



Travis很好我想得到的结果显示在GitHub(他们现在不做)。我想知道如何启用这个。



UPDATE



在这里找到一个例子:https://github.com/sebastianbergmann/phpunit/pull/1051/commits 查看小型绿色勾号标记Travis-CI build passed

解决方案

我给你我的例子 - https://github.com/simkimsia/UtilityBehaviors



我在README.mdown写了这篇文章

  ### Status 
[[Build Status](https://travis-ci.org/simkimsia/UtilityBehaviors.png)](https:// travis-ci.org/simkimsia/UtilityBehaviors)

因此答案是

  [![Build Status](您的travis网址为repo here.png)](您在这里的travis网址)

编辑



您可能意味着打开Travis服务挂钩。



如果这是你的意思,请转到您的github repo>设置>服务挂钩。使用Ctrl + F并搜索Travis。



EDIT2:



https://travis-ci.org/profile/ {填写您自己的用户名} /个人资料



然后复制令牌并将其粘贴到您的Github Repo设置部分的Travis服务Hook页面。



在Travis中输入您的用户名



您应该会看到有效载荷已成功发送。



尝试测试发送令牌按钮。 >

如果这个工作,你的github仓库现在连接到你的travis。



EDIT3:



OP正在询问在pull请求页面中发现的提交的travis构建状态。



只要有提交,travis构建状态就会出现在任何地方。



我的回答是假设不正确。


I remember recently seeing the Travis build status of a pr or commit in GitHub browsing the repository (..but can't fine where). I'm not talking about the Travis build status images in README.md but an actual GitHub feature (green box with a friendly check mark).

While my commits build on Travis just fine I'd like to get the results displayed in GitHub (which they don't do right now). I'd like to know how to enable this.

UPDATE

Found an example here: https://github.com/sebastianbergmann/phpunit/pull/1051/commits see the small green checkmark sying "Travis-CI build passed"?

解决方案

I give you my example - https://github.com/simkimsia/UtilityBehaviors

I wrote this in my README.mdown

### Status
[![Build Status](https://travis-ci.org/simkimsia/UtilityBehaviors.png)](https://travis-ci.org/simkimsia/UtilityBehaviors)

So the answer is

[![Build Status](your travis url for the repo here.png)](your travis url for the repo here)

EDIT:

I realized that you may mean turning on the Travis Service Hook.

If that is what you mean, go to your github repo > Settings > Service Hooks. Use Ctrl+F and search for Travis.

EDIT2:

Go to https://travis-ci.org/profile/{fill in your own usernam}/profile

Then copy the token and paste it inside the Travis Service Hook page in your Github Repo Settings section.

Type in your username in Travis as well.

Try the test send token button.

You should see payload successfully sent.

If this works, your github repo is now hooked up to your travis.

EDIT3:

The OP is asking about the travis build status for commits found in pull requests pages.

He assumed that the travis build status will appear anywhere as long as there is a commit.

My answer is that the assumption is not correct.

这篇关于在GitHub repo中显示Travis构建状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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