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

feat: Allow importing bot content from an external source #4751

Merged
merged 17 commits into from
Nov 11, 2020

Conversation

tonyanziano
Copy link
Contributor

@tonyanziano tonyanziano commented Nov 10, 2020

Description

This PR allows Composer to accept a deep link with the following form:

bfcomposer://import?source={source}&payload={urlEncodedJSONWithMetadata}

This will then display UI that allows the user to sign in to the external service -- if necessary -- and download the bot content to either be saved as a new bot project within Composer, or imported into an existing project with a matching identifier.

NOTES:

  • tests on the way
  • small refactors on the way

Task Item

Fixes #4125, #4131

Screenshots

Connecting to service

import5
import1
import2
import3

Update existing project

import4

Import as new project

import6
import7

Composer/packages/server/src/server.ts Outdated Show resolved Hide resolved
@@ -278,4 +362,30 @@ export class BotProjectService {
return '';
}
};

public static backupProject = async (project: BotProject): Promise<string> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference between this and backupProject defined under controller

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is another artifact from the larger feature branch. This same logic is used by the "Pull" feature which will be broken out into a separate PR following this one. I will delete this one for now until I open that PR.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 55.063% when pulling 8ecf647 on toanzian/feat/import into 7de7354 on main.

@cwhitten cwhitten merged commit f22adeb into main Nov 11, 2020
@cwhitten cwhitten deleted the toanzian/feat/import branch November 11, 2020 18:05
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
alanlong9278 added a commit to alanlong9278/BotFramework-Composer that referenced this pull request Nov 16, 2020
* settingsPage: (22 commits)
  Refactoring function calls
  fix: remove special case for single-bot view in tree (microsoft#4803)
  fix bug
  fix UT
  code refine
  Removed other languages for now. (microsoft#4789)
  Made the default width for the property editor wider (microsoft#4788)
  pass csrf token to plugin hosts (microsoft#4787)
  Updated disability styles
  chore: rebase main onto bot-projects feature branch (microsoft#4780)
  fix: zip file can not be deleted (microsoft#4760)
  Remove enforce auto end dialog for skill bots (microsoft#4440)
  Several PVA integration improvements / bug fixes (microsoft#4776)
  Updated strings from building (microsoft#4762)
  feat: Implement pull from publish target (microsoft#4768)
  fix: Allowed 404 to fall through axios during import flow (microsoft#4770)
  increase unit tests timeout to 30 min (microsoft#4764)
  feat: Allow importing bot content from an external source (microsoft#4751)
  Localized resource files from OneLocBuild (microsoft#4730)
  force node extensions to only require commonjs (microsoft#4755)
  ...
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…4751)

* Added ability to parse "import" deeplinks

* Server-side changes for import

* Client changes for import

* Added checkForPVASchema util

* Token caching fix and bad import fix

* Various refactors

* Linting fixes

* Client side refactors and PR comments

* Server side PR comments and linting

* Fix schema tests

* Fixed bot project controller tests

* Removed unused import

* Added logic to auth against the correct PVA environment on import

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement "import" protocol handler
4 participants