Repository navigation
feat(woof): add WOOF easter egg - #8301
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesWOOF Request Response Path
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/bruno-electron/src/ipc/network/index.js`:
- Line 878: The condition at line 878 calls `.toUpperCase()` on `request.method`
without first verifying that it is a string, which can throw an error if the
method is null, undefined, or another non-string type. Since this check occurs
before the function's main try/catch block, any error will bypass normal error
handling. Add a guard condition to verify that `request.method` exists and is a
string (using typeof check or optional chaining) before calling `.toUpperCase()`
on it in the comparison with 'WOOF'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c4826294-c886-4a71-adbc-e510c78cd2c5
📒 Files selected for processing (1)
packages/bruno-electron/src/ipc/network/index.js
|
Love this. Please have this merged @sid-bruno @bijin-bruno |
Bruno fetched your request. Good human.
Description
Adds a small easter egg: setting the HTTP method to
WOOF(any case) short-circuits the network call and returns a synthetic200 Woof!response — Bruno's mascot answering on behalf of the request. No real traffic is sent.Where it lives — a single early-return inside
runRequestinpackages/bruno-electron/src/ipc/network/index.js, immediately afterprepareRequestreturns and before any side-effectful work (pre-request scripts, axios config, network call). Pre-request scripts, tests, and post-response scripts are intentionally skipped — the response is synthetic, so running user assertions against it would be misleading.Response shape
status: 200,statusText: "Woof!"content-type: text/plain; charset=utf-8,x-good-boy: true,x-fetched-by: brunoWhy no UI/schema changes are needed
HttpMethodSelector).method(packages/bruno-schema/src/collections/index.js).httpcustomrule (packages/bruno-lang/v2/src/bruToJson.js).How to try it
WOOF→ Send.200 Woof!and the ASCII body. No traffic in DevTools Network.Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit