Giter VIP home page Giter VIP logo

travis-buddy's Introduction

TravisBuddy Build Status Heroku

TravisBuddy is a cloud service that creates comments in failed pull requests and tell the author what went wrong and what they can do to fix it.

Why should I use it?

  • It takes 2 minutes to integrate TravisBuddy with your GitHub repository, assuming it's already integrated with TravisCI
  • It will save precious time to you and to your contributors, as you won't have to explain what went wrong, and they won't have to go through the whole build log in TravisCI.
  • It's free, open source and awesome.

TravisBuddy example comment

Repositories Using TravisBuddy

TravisBuddy is already being trusted by few repositories on GitHub. It automatically stars every project using it, so you can easily see who's using it.

Getting Started

Public Repositories

If you're already using Travis CI, modify your .travis.yml and add the following lines:

notifications:
    webhooks: https://www.travisbuddy.com/

If not, enable Travis CI in your repository by following the tutorial in their website according to the tech you're using, and then add the code above to .travis.yml.

Here's how your .travis.yml should look like if you're using node_js:

language: node_js
node_js:
    - "8"
notifications:
    webhooks: https://www.travisbuddy.com/

Configuration

You can configure TravisBuddy by adding a travisBuddy node to your travis.yml i.e.:

language: node_js
node_js:
    - "8"
notifications:
    webhooks: https://www.travisbuddy.com/
travisBuddy:
    regex: "(\d+ failing)"

You may use the following configuration keys:

Key Description Values
regex Tells TravisBuddy to take only parts of the log. The regex is executed on each test script separately, and TravisBuddy will only show the first result catched using parentheses Any valid regular expression
regexOptions Use along with regex to apply regular expression options Any valid regular expression option, i.e. g
insertMode Tells TravisBuddy to comment once and keep editing that one comment instead of appending new comment for every build (default) append or update

Custom Template

If TravisBuddy finds a file name travis-buddy-failure-template.md in the root of the branch it's commenting on, it'll be used as a template for the comments.

The content of the file must be a valid mustache template. If you don't know the syntax, visit the mustache documentation or refer to this sample template.

Disable success message

If you only want TravisBuddy to create comments when the tests fail, add on_success: never to the notifications node, like this:

notifications:
    webhooks: https://www.travisbuddy.com/
    on_success: never

Update comments mode

If you want TravisBuddy to only create one comment, add ?insertMode=update to the webhook URL. TravisBuddy will create one comment and when there is for example a new reason the tests fail, it will update that one with the new information.

notifications:
    webhooks: https://www.travisbuddy.com/?insertMode=update

Private Repositories

TravisBuddy is not yet supported on private repositories. However, we're working on it, so stay alarmed.

What if I still can't get it to work?

Feel free to contact us using the website, or leave an issue in our GitHub repository.

Run Locally

It's easy to run a local instance of TravisBuddy - just clone the repository, run npm i and use:

  • npm test for tests
  • npm start to run

Test Repositories

The plan is to create a repository for each resolver (test library) So far, we have:

Deploy to Heroku

Deploy

Contribution

Feel free to create issues or create pull requests. Follow the "Run locally" section of this documentation to learn how to debug the project.

Note that there are open issues with detailed instruction on how to resolve them, so if you want to help - just pick one labeled good first issue.

License

This project is licensed under the MIT License.

travis-buddy's People

Contributors

alejandronanez avatar andrewda avatar bluzi avatar chrisf avatar davidb1 avatar eddiecooro avatar evansa avatar ganes1410 avatar geekdave avatar kenman345 avatar panmau avatar rmzelle avatar sillebille avatar snyk-bot avatar stephengroat avatar travisbuddy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.