Skip to content

Conversation

toph-allen
Copy link
Collaborator

Intent

Add convenience functions to lock content (with an optional message) and unlock content.

Fixes #453

Approach

Locking content is done through the "update content" PATCH request. This implementation calls methods on the content object.

Although many existing functions are named e.g. content_update() these are named lock_content() and unlock_content(). There are enough functions that go either way that whatever these are named, it'll be inconsistent. 🥲

Checklist

  • Does this change update NEWS.md (referencing the connected issue if necessary)?
  • Does this change need documentation? Have you run devtools::document()?

@toph-allen toph-allen requested review from jonkeane and karawoo October 9, 2025 16:31
@toph-allen toph-allen marked this pull request as draft October 9, 2025 16:41
@toph-allen toph-allen marked this pull request as ready for review October 9, 2025 17:39
Copy link
Contributor

@karawoo karawoo left a comment

Choose a reason for hiding this comment

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

Nice addition! 2 very small suggestions below

toph-allen and others added 2 commits October 9, 2025 16:28
Co-authored-by: Kara Woo <karawoo@users.noreply.github.com>
- Test locking content twice with different messages
- Test that locking without a message clears existing message
@toph-allen toph-allen requested a review from karawoo October 9, 2025 20:40
Copy link
Contributor

@karawoo karawoo left a comment

Choose a reason for hiding this comment

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

I think this just needs devtools::document() re-run and pushed

@toph-allen
Copy link
Collaborator Author

I think this just needs devtools::document() re-run and pushed

Thanks. I'm gonna do #295 next week…

@toph-allen toph-allen merged commit 2522605 into main Oct 14, 2025
21 checks passed
@toph-allen toph-allen deleted the toph/lock-content branch October 14, 2025 15:14
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.

Add a function to lock a content item

2 participants