Skip to content

Commit

Permalink
add tips, track authenticated (#2332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-Herve authored Sep 22, 2023
1 parent d830b7b commit a43d6d1
Showing 1 changed file with 17 additions and 2 deletions.
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

0 comments on commit a43d6d1

Please sign in to comment.