heroku / heroku-ci

this code is now in https://github.com/heroku/cli
https://www.npmjs.com/package/@heroku-cli/plugin-ci
MIT License
15 stars 14 forks source link

Improve CLI error message "Not found." #36

Open schneems opened 7 years ago

schneems commented 7 years ago

When running a CI command if there is a problem this is the only error output:

$ heroku ci:debug
 ▸    Not found.

You can get this error if the app you're running ci:debug on does not have a pipeline attached to it. Also if that pipeline is not linked to a github account.

We should explicitly account for both of those cases and give better error messages

Proposal

$ heroku ci:debug
 ▸    Error: This application `issuetriage` does not have a connected pipeline
      To add a pipeline run `$ heroku pipelines:create issuetriage`, for more 
      info see https://devcenter.heroku.com/link-to-something-explaining-why-pipelines-are-needed

and

$ heroku ci:debug
 ▸    Error: This pipeline for app `issuetriage` is not connected to a GitHub Repo
      To connect this application to a GitHub Repo and enable CI please visit
      https://dashboard.heroku.com/pipelines/374207ae-37c1-4907-bfd0-d6eef4c46a02
      And select "connect to GitHub" button.

      For more info on why this is needed please 
      info see https://devcenter.heroku.com/link-to-something-explaining-why-github-is-needed

As a side note, do we have a CLI command that allows you to connect to GitHub? That would be really nice.

gudmundur commented 7 years ago

So much yes to this! It hurts my eyes to see the errors that we currently have. This is just a matter of settings aside the time and just-do-it.

We don't have a public API for GitHub Sync yet, and we decided not to do a CLI before we're a little more comfortable with out API.