Skip to content

Commit d25e041

Browse files
misc improvements (#2322)
1 parent 04ec3d4 commit d25e041

File tree

1 file changed

+14
-16
lines changed
  • projects/optic/src/commands

1 file changed

+14
-16
lines changed

projects/optic/src/commands/run.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const usage = () => `
4848
4949
CI usage
5050
------------------------
51-
Lint and check changes to your specifications, update cloud spec repository and post a friendly summary to the PR/MR.
5251
Visit https://www.useoptic.com/docs/setup-ci for detailed CI setup instructions.
5352
`;
5453

@@ -115,7 +114,7 @@ export function registerRunCommand(cli: Command, config: OpticCliConfig) {
115114
cli
116115
.command('run')
117116
.description(
118-
`Optic's complete workflow command: find OpenAPI specifications in your repository, lint them, search for breaking changes, update your Optic cloud specs repository, log results and post a human-readable summary of the changes to your pull request.`
117+
`Optic's workflow command: validate your OpenAPI specification files, check API governance policies, search for breaking changes and post a human-readable summary of the changes to your pull request.`
119118
)
120119
.configureHelp({ commandUsage: usage })
121120
.option(
@@ -252,7 +251,7 @@ function report(specReports: SpecReport[]) {
252251

253252
logger.info(`| ${breakingChangesReport}${designReport}`);
254253

255-
if (report.diffs && report.changelogLink) {
254+
if (report.changelogLink) {
256255
logger.info(`| View report: ${report.changelogLink}`);
257256
}
258257
logger.info('');
@@ -382,31 +381,30 @@ export const getRunAction =
382381
logger.info(
383382
`Optic matched ${localSpecPaths.length} OpenAPI specification file${
384383
localSpecPaths.length > 1 ? 's' : ''
385-
}: ${localSpecPaths.join(', ')}.\n`
384+
}:`
386385
);
386+
logger.info(`${localSpecPaths.join(', ')}.\n`);
387387

388388
const generatedDetails = await getDetailsForGeneration(config);
389389
if (!generatedDetails) return;
390390

391-
logger.info(`-------------------------------------
391+
logger.info(`--------------------------------------------------------------------------------------------------
392392
393-
Comparing your local specifications to their latest \`${cloudTag}\` version on Optic cloud, then pushing them ${
394-
cloudTag === currentBranchCloudTag ? 'back ' : ''
395-
}to \`${currentBranchCloudTag}\`.
396-
397-
Optic Cloud
398-
┌───────────────┐ ┌───────────────┐
399-
│ [1] │ │ [2] │
400-
└───┬───────────┘ └───────────▲───┘
393+
┌─────────────────────────────────┐
394+
│ [1] Optic Cloud [2] │
395+
└───┬─────────────────────────▲───┘
401396
│Compare Update│
402397
┌───▼─────────────────────────┴───┐
403398
│ Local specs │
404399
└─────────────────────────────────┘
405400
406-
[1]: ${cloudTag} (Optic tag for target branch in a PR/MR situation, current branch otherwise)
407-
[2]: ${currentBranchCloudTag} (Optic tag for current branch)
401+
[1]: Comparing your local specifications to their latest \`${cloudTag}\` version in Optic cloud.
402+
(Optic compares against the target branch tag upon a PR/MR event, and the current branch tag otherwise)
403+
404+
[2]: Pushing local specs as latest versions for \`${currentBranchCloudTag}\` in Optic cloud.
405+
(Updating the current branch tag)
408406
409-
-------------------------------------`);
407+
--------------------------------------------------------------------------------------------------`);
410408
if (!commentToken && isPR) {
411409
logger.info(
412410
`Pass a GITHUB_TOKEN or OPTIC_GITLAB_TOKEN environment variable with write permission to let Optic post comment with API change summaries to your pull requests.\n`

0 commit comments

Comments
 (0)