fix: only push and pull models with meaningful changes#217
Draft
angeloashmore wants to merge 1 commit into
Draft
fix: only push and pull models with meaningful changes#217angeloashmore wants to merge 1 commit into
angeloashmore wants to merge 1 commit into
Conversation
6760dbc to
03882ca
Compare
The Prismic API sometimes returns model properties in a different order than the local files. That is not a real change, but pull, push, and status treated it as one, so users saw models to sync when nothing had really changed. These commands now act only on real changes, like a new field, a reordered field, or a changed value. A difference in property order alone is ignored. Local files also stay stable, so later pulls only show real edits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
03882ca to
ffceb86
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves:
Description
The Prismic API sometimes returns model properties in a different order than the local files. That is not a real change, but
pull,push, andstatustreated it as one. Users saw models to sync when nothing had really changed.These commands now act only on real changes, like a new field, a reordered field, or a changed value. A difference in property order alone is ignored.
These two are treated as the same model. Only the property order changed:
{ "id": "page", "label": "Page", "repeatable": true, "json": { "Main": { "title": { "type": "Text" } } } } { "label": "Page", "repeatable": true, "json": { "Main": { "title": { "type": "Text" } } }, "id": "page" }Reordering fields is a real change, so it still syncs:
{ "id": "page", "label": "Page", "repeatable": true, "json": { "Main": { "title": { "type": "Text" }, "body": { "type": "Text" } } } } { "id": "page", "label": "Page", "repeatable": true, "json": { "Main": { "body": { "type": "Text" }, "title": { "type": "Text" } } } }Local files also stay stable. A
pullwrites properties in a consistent order, so later pulls only show real edits.Checklist
Preview
How to QA