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

fix: doc attribute inconsistencies #101

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

joshbeard
Copy link
Contributor

Replace the otherattributemodifier package with a simpler ModifyPlan
receiver function for handling attribute changes when other attributes
change. Most doc attributes should cause the "revision", "updated_at",
"user", and "algolia" attributes to be unknown, since they are updated
when changes to a doc are published. This also applies to the 'version'
resource.

Prior to this, the body's value wasn't tracked properly due to
normalization by the ReadMe API. With this update, the body attribute
tracks the user-provided value while the body_clean attribute is the
normalized version that gets compared to the API.

An additional change adds a second post-apply read of the doc to ensure
the stable values from the API are used in the state.

dependabot bot and others added 2 commits January 17, 2024 23:24
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](cloudflare/circl@v1.3.3...v1.3.7)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Replace the `otherattributemodifier` package with a simpler `ModifyPlan`
receiver function for handling attribute changes when other attributes
change. Most doc attributes should cause the "revision", "updated_at",
"user", and "algolia" attributes to be unknown, since they are updated
when changes to a doc are published. This also applies to the 'version'
resource.

Prior to this, the body's value wasn't tracked properly due to
normalization by the ReadMe API. With this update, the `body` attribute
tracks the user-provided value while the `body_clean` attribute is the
normalized version that gets compared to the API.

An additional change adds a second post-apply read of the doc to ensure
the stable values from the API are used in the state.
@joshbeard joshbeard added the bug Something isn't working label Jan 18, 2024
@joshbeard joshbeard requested a review from a team as a code owner January 18, 2024 17:56
@joshbeard joshbeard requested a review from bdwellons January 18, 2024 17:56
@joshbeard joshbeard merged commit d2d0e94 into LiveOakLabs:main Jan 19, 2024
15 checks passed
@joshbeard joshbeard deleted the user-attribute branch January 19, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants