Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR adds bidirectional conversion between Bruno post-response variables and OpenCollection actions. It introduces mapping helpers in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces OpenCollection actions support by refactoring how post-response variables are handled. Bruno's post-response variables are now converted to OpenCollection 'set-variable' actions with phase 'after-response', providing a more structured approach to handling response-based variable assignments. The dependency on @opencollection/types has been upgraded from 0.2.0 to 0.3.0 and centralized to the root package.
- Introduced new
actions.tsmodule with bidirectional conversion functions between Bruno post-response variables and OpenCollection actions - Refactored
variables.tsto handle only pre-request variables, removing post-response variable logic - Updated HTTP and GraphQL request stringify/parse functions to use the new actions conversion
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/bruno-filestore/tsconfig.json | Updated TypeScript path mappings to reference @opencollection/types from root node_modules instead of package-specific location |
| packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts | Added actions conversion from Bruno post-response variables using toOpenCollectionActions |
| packages/bruno-filestore/src/formats/yml/items/stringifyGraphQLRequest.ts | Added actions conversion from Bruno post-response variables using toOpenCollectionActions |
| packages/bruno-filestore/src/formats/yml/items/parseHttpRequest.ts | Updated to convert OpenCollection actions back to Bruno post-response variables using toBrunoPostResponseVariables |
| packages/bruno-filestore/src/formats/yml/items/parseGraphQLRequest.ts | Updated to convert OpenCollection actions back to Bruno post-response variables using toBrunoPostResponseVariables |
| packages/bruno-filestore/src/formats/yml/common/variables.ts | Refactored to handle only pre-request variables, removed post-response variable scope marker logic |
| packages/bruno-filestore/src/formats/yml/common/actions.ts | New module providing bidirectional conversion between Bruno post-response variables and OpenCollection set-variable actions |
| packages/bruno-filestore/package.json | Removed @opencollection/types from devDependencies (now managed at root level) |
| package.json | Added @opencollection/types 0.3.0 to root devDependencies |
| package-lock.json | Updated lock file to reflect dependency changes - removed package-specific @opencollection/types 0.2.0 and added root-level 0.3.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: setVarAction.variable?.name || '', | ||
| value: setVarAction.selector?.expression || '', | ||
| enabled: setVarAction.disabled !== true, | ||
| local: false |
There was a problem hiding this comment.
The local field is hardcoded to false, which causes loss of scope information during round-trip conversion. When an action has scope 'request', it should be converted to a Bruno variable with local: true, but currently all variables are set to local: false. This should be: local: setVarAction.variable?.scope === 'request'
| local: false | |
| local: setVarAction.variable?.scope === 'request' |
Description
Opencollection Actions
Summary by CodeRabbit
New Features
Chores
@opencollection/typesdependency to version 0.3.0.✏️ Tip: You can customize this high-level summary in your review settings.