Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Contentful Import improvements (drafts, etc) #35

Merged
merged 5 commits into from
May 16, 2019

Conversation

ullmark
Copy link
Contributor

@ullmark ullmark commented Apr 15, 2019

Hi,
Two changes;

  1. Added a --skipContent flag to the contentful import that makes the import skip content and assets, but instead only creates the models.
  2. Since Contentful by default has a "publish/draft" system, it seems only logical that the imported models defaults to have that activated as well (In the previous code, entities not published in Contentful would be automatically published after an import to Dato). The importer now has a step last that publishes all the imported records that were published in Contentful.

Copy link
Member

@matjack1 matjack1 left a comment

Choose a reason for hiding this comment

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

Apart from the publish step, it looks good to me. I've tested it with a simple project and it works fine, both with and without the --skipContent flag.

@stefanoverna what do you think?

src/contentfulImport/command.js Show resolved Hide resolved
@ullmark
Copy link
Contributor Author

ullmark commented Apr 17, 2019 via email

@matjack1
Copy link
Member

@stefanoverna this makes sense to me and it works on my test project. I would merge it, what do you think?

@stefanoverna stefanoverna merged commit 12fefec into datocms:master May 16, 2019
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.

3 participants