Post the relevant part of your broken CI build to the PR that triggered it

Usage no npm install needed!

<script type="module">
  import failToPr from '';


I made this package so I can see the snapshots tests that failed in a travis build.
Currently it handles only a very specific use case: failed cypress-image-snapshot tests in travis (probably jest-image-snapshot too). But I want to add more features, so send an issue or a PR if you want to use it for something else or need more customization.

Follow @pomber for updates


  1. Install it:
$ yarn add --dev fail-to-pr
  1. Wrap your test script in package.json:
-    "cy:run": "cypress run",
+    "cy:run": "fail-to-pr cypress run",
  1. Create a GitHub token (with repo scope)

  2. Add the token as "GH_TOKEN" env var in travis (make sure to leave the "Display value in build log" disabled)


Released under MIT license.