This repository was archived by the owner on Jun 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Skip writing unchanged files #5
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 @rodikh @davbree an important notes about merging data here...
Originally the reason for this kind of merging in stackbit-pull, and also in container here, was done because we didn't model the full structure of Jekyll/Hugo config files.
For example, while Jekyll config could be something like this:
We only modeled the
baseurlandtitle. Meaning that data stored in Contentful had only thebaseurlandtitlefields. The rest of the fields were left in the config.yaml.That means that when stackbit-pull fetches the content, it should not override everything but assign the additional values stored in CMS.
I admit, this was a huge mistake :)
One of the possible solution was this task:
https://www.notion.so/stackbit/Themes-Move-all-config-yaml-params-to-a-separate-file-91517dbceafb40a4a21c2fc01de4319d#764577d127764bfd925d9d157449ad98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like we should fix it! :)
Created this task https://www.notion.so/stackbit/Fix-stackbit-pull-merging-behavior-4c99c343ed704a3097ca4784bdedf9f5
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should be fixed, but only after we update our themes according to the previous task, and also we need to make sure it is backward compatible with existing projects.
Basically, the merge should be made only if the model is of type
config- meaning the object in CMS hasstackbit_model_type=config.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smnh I actually mentioned this exact issue to David on slack just before you commented here.
In any case, let's release this totally unrelated PR and deal with this new issue separately.