Showing Travis build status in GitHub repo

后端 未结 5 1763
逝去的感伤
逝去的感伤 2021-01-29 20:50

I remember recently seeing the Travis build status of a pr or commit in GitHub browsing the repository (but can\'t find where). I\'m not talking about the Travis build status im

5条回答
  •  不知归路
    2021-01-29 21:09

    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.

提交回复
热议问题