feat(DCP-2500): add study update command#348
Merged
script-this merged 2 commits intomainfrom Mar 10, 2026
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Add `prolific study update <id> -t <file>` command that sends a JSON template directly to PATCH /api/v1/studies/:id/. Supports stdin via `-t -`, `--json` for machine-readable output, and `--silent` for scripting. Widen UpdateStudy client signature to `any` for arbitrary JSON passthrough.
e9ccdb0 to
bf2d83c
Compare
Remove stale nolint directives for G704 (no longer flagged) and add G703 exclusion for scripts/changelog/ where resolvePath already guards against path traversal.
keyboSlice
reviewed
Mar 10, 2026
| GetSubmissions(ID string, limit, offset int) (*ListSubmissionsResponse, error) | ||
| TransitionStudy(ID, action string) (*TransitionStudyResponse, error) | ||
| UpdateStudy(ID string, study model.UpdateStudy) (*model.Study, error) | ||
| UpdateStudy(ID string, study any) (*model.Study, error) |
Contributor
There was a problem hiding this comment.
What caused us to loosen the type here?
Contributor
Author
There was a problem hiding this comment.
Good question: requirement to support the 30+ optional fields with complex nested types and subsequent need to update it for any small study schema change. Given we're proxying it with user-provided json for update, felt like the better fit.
keyboSlice
approved these changes
Mar 10, 2026
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.
Summary
prolific study update <id> -t <file>command that sends a JSON template directly toPATCH /api/v1/studies/:id/-t -,--jsonfor machine-readable output,--silent/-sfor scriptingUpdateStudyclient signature frommodel.UpdateStudytoanyfor arbitrary JSON passthroughTest plan
make all— lint, tests, and build pass--json)--silent)-t -)increase-placesandset-credential-poolstill workDCP-2500