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: Import Insomnia collection to Hoppscotch #2031

Merged
merged 4 commits into from
Dec 20, 2021
Merged

feat: Import Insomnia collection to Hoppscotch #2031

merged 4 commits into from
Dec 20, 2021

Conversation

anwarulislam
Copy link
Member

@anwarulislam anwarulislam commented Dec 19, 2021

Closes #

Description

I have added a feature to import the Insomnia collection to Hoppscotch. When a user selects Import from JSON I'm checking that is this collection from Insomnia or not. if it's from insomnia then I'm parsing the JSON and transforming it to Postman collection. The parsing script in helpers/utils directory. And the import is working as regular.

  • Completed

Checks

  • My pull request adheres to the code style of this project
  • All the tests have passed

Additional Information

@netlify
Copy link

netlify bot commented Dec 19, 2021

‼️ Deploy request for hoppscotch rejected.
Learn more about Netlify's sensitive variable policy

🔨 Explore the source changes: f47e37e

@anwarulislam anwarulislam marked this pull request as ready for review December 19, 2021 20:23
@anwarulislam
Copy link
Member Author

@liyasthomas I've PRed this feature. Could you please review this PR? Please let me know if any modification needed.

@AndrewBastin
Copy link
Member

@anwarulislam I tried importing a Insomnia collection and it created a collection with an empty name.

image

A better approach will be if all those folders were in the root itself ?

Here is the Insomnia collection I tested with (as a ZIP because Github doesn't allow JSON attachments)
Insomnia_2021-12-20.zip

@anwarulislam
Copy link
Member Author

@AndrewBastin I'll fix this tonight. And will update this PR. Thanks

@anwarulislam
Copy link
Member Author

@AndrewBastin also, did you check that there is an error while importing postman collection.

If any requests has the hostname as variable then that URL doesn't add up after importing.

Please check this in production. If you found the error let me know. I'll fix this ASAP

@AndrewBastin
Copy link
Member

@anwarulislam okay noted. We are working on rewriting the entire Import/Export system as the codebase is really old and to be honest really sucks, we are just waiting for this PR to be merged in so we can start the refactor.

@anwarulislam
Copy link
Member Author

@AndrewBastin I've fixed the collection name issue of Insomnia. Now, you can import the collection from Insomnia and you will see the name. If no name found then it will be Untitled

Copy link
Member

@AndrewBastin AndrewBastin left a comment

Choose a reason for hiding this comment

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

@anwarulislam LGTM!!! 💯

Thank you for your contributions!!! ❤️

@liyasthomas anything else ?

@anwarulislam
Copy link
Member Author

@AndrewBastin Thanks for the review. No nothing else in this branch. You can merge it if it's good to go :D

Copy link
Member

@liyasthomas liyasthomas left a comment

Choose a reason for hiding this comment

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

LGTM. cc: @AndrewBastin

@AndrewBastin AndrewBastin merged commit daa617f into hoppscotch:main Dec 20, 2021
@liyasthomas liyasthomas linked an issue Dec 21, 2021 that may be closed by this pull request
1 task
@anwarulislam anwarulislam deleted the feat/import-insomnia branch December 22, 2021 20:01
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.

[feature]: Import Insomnia collection to Hoppscotch like Postman
3 participants