Skip to content
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

add tips, track authenticated #2332

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions projects/optic/src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export const getRunAction =
'optic.run.init',
{
isInCi: config.isInCi,
isAuthenticated: config.isAuthenticated,
commentToken: !!commentToken,
isPR,
...optionsForAnalytics(options),
Expand Down Expand Up @@ -605,14 +606,28 @@ export const getRunAction =

await flushEvents();

logger.info('');

if (!config.isInCi) {
logger.info('');
logger.info(
`🤖 Don't forget to add Optic to your CI flow: https://www.useoptic.com/docs/setup-ci`
`🤖 Add Optic to your CI flow: https://www.useoptic.com/docs/setup-ci`
);
}

if (config.isInCi && !commentToken) {
logger.info(
`💬 Configure commenting on PR/MR: https://www.useoptic.com/docs/setup-ci#configure-commenting-on-pull-requests-optional`
);
}

if (config.isDefaultConfig) {
logger.info(
`🔧 Customize your governance rules: https://www.useoptic.com/docs/lint-openapi`
);
}

if (exit1) {
logger.info('');
logger.info(
'Exiting with code 1 as errors were found. Disable this behaviour with the `--severity none` option.'
);
Expand Down