Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Adding luis:application:create cmd and tests / refactor utils and clo…#351

Merged
munozemilio merged 4 commits intomastermicrosoft/botframework-cli:masterfrom
302-luis-application-createmicrosoft/botframework-cli:302-luis-application-createCopy head branch name to clipboard
Nov 13, 2019
Merged

Adding luis:application:create cmd and tests / refactor utils and clo…#351
munozemilio merged 4 commits intomastermicrosoft/botframework-cli:masterfrom
302-luis-application-createmicrosoft/botframework-cli:302-luis-application-createCopy head branch name to clipboard

Conversation

@jspruance
Copy link

  • create 'luis:application:create' cmd and tests
  • refactor of utils to make input processing more generic
  • update clone cmd to support utils refactor

const {flags} = this.parse(LuisApplicationCreate)
const flagLabels = Object.keys(LuisApplicationCreate.flags)
const configDir = this.config.configDir
const configPrefix = 'luis__'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to utils since it is the same for all commands

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

versionId: flags.versionId || (config ? config.luis__versionId : null),
targetVersionId: flags.targetVersionId || (config ? config.luis__targetVersionId : null)
}
const input: any = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the previous implementation is clearer to understand what the programs is retrieving from the config, plus it is easier to control the flow

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the previous implementation was hardcoded to one cmd (clone) so it wasn't flexible for general use. That's why I changed it to set the flags dynamically so that it works across the board.

Copy link
Contributor

@munozemilio munozemilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CIL

@munozemilio munozemilio merged commit 782f25c into master Nov 13, 2019
@munozemilio munozemilio deleted the 302-luis-application-create branch November 13, 2019 22:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.