-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webhooks): add oclif version of webhooks plugin #1253
Conversation
I think thrown errors show a stacktrace unless let path
try {
let type = webhookType(flags)
path = type.path
} catch (e) {
this.error(e.message)
} Which would give us: ./bin/run webhooks:events:info
› Error: No app specified instead of the current behavior: Error: No app specified
at Object.default_1 [as default] (~/projects/heroku/cli/packages/webhooks/src/webhook-type.ts:19:9)
at Info.run (~/projects/heroku/cli/packages/webhooks/src/commands/webhooks/events/info.ts:29:31)
at Info._run (~/projects/heroku/cli/node_modules/@oclif/command/lib/command.js:34:31) |
093aa50
to
386eed5
Compare
- Add cli-ux and @heroku-cli/color packages - Migrate webhookType helper
Tests can be an issue when using cli-ux features that use oclif/screen. Depending on the width of the terminal the output might wrap or truncate. To get around this we set the global `columns` value, which is checked by oclif/screen. This specifically impacted tables and error message wrapping. 140 characters appears to be a width that works for the tests currently. See https://github.com/oclif/screen
aa3d7f3
to
3818dd4
Compare
a1afd28
to
b84bc6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this comment on a two commands but it check all commands:
- use
flags.pipeline
from@heroku-cli/command
- make sure the arg ID is required
…into cc/add-oclif-webhooks-plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏄
cc @ransombriggs just a heads-up on this port to v7 |
This pull request migrates the
webhooks-v5 plugin
to a version written in oclif.