Skip to content

fix: basic Auth inheritance in code generation#6805

Merged
bijin-bruno merged 5 commits intousebruno:mainfrom
sanjaikumar-bruno:fix/basic-auth-inheritance
Jan 14, 2026
Merged

fix: basic Auth inheritance in code generation#6805
bijin-bruno merged 5 commits intousebruno:mainfrom
sanjaikumar-bruno:fix/basic-auth-inheritance

Conversation

@sanjaikumar-bruno
Copy link
Member

@sanjaikumar-bruno sanjaikumar-bruno commented Jan 14, 2026

BRU-2250

Summary by CodeRabbit

  • Bug Fixes
    • Generated code snippets now show the correct authentication and request URL: example-style snippets receive only example auth info, while regular generated snippets include the full resolved auth and final URL so both example and real-request code display accurate auth and endpoint details.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

Final request composition in GenerateCodeItem no longer spreads resolvedRequest. It now spreads requestData.request, sets auth: resolvedRequest.auth, and sets url to finalUrl, producing an explicit merge order for the final request object.

Changes

Cohort / File(s) Summary
Request composition change
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js
Removed spreading of resolvedRequest into the final request. Now spreads requestData.request first, adds auth: resolvedRequest.auth, and assigns url: finalUrl, changing the final merge result.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

size/S

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

A small tweak in how requests combine,
auth lifted out to sit in line,
URL fixed where it belongs,
merges tidy, none go wrong,
a neat little change — short and fine.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: basic Auth inheritance in code generation' directly aligns with the main change: modifying how authentication is inherited in the GenerateCodeItem component during code generation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acb66f4 and 380a4ea.

📒 Files selected for processing (1)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: Unit Tests
  • GitHub Check: SSL Tests - macOS

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bijin-bruno bijin-bruno merged commit c513818 into usebruno:main Jan 14, 2026
8 checks passed
@sanjaikumar-bruno sanjaikumar-bruno deleted the fix/basic-auth-inheritance branch January 15, 2026 09:52
FraCata00 pushed a commit to FraCata00/bruno that referenced this pull request Feb 9, 2026
* fix: include auth in request data for GenerateCodeItem

* fix: conditionally include auth in request data for GenerateCodeItem

* fix: simplify auth inclusion in requestData

* fix: streamline auth assignment in requestData for GenerateCodeItem

* fix: clarify comments on auth resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants