Skip to content

chore(release): pull main into develop post release v1.102.2 - #4412

Merged
maheshkutty merged 3 commits into
developfrom
main
Jun 19, 2025
Merged

maheshkutty merged 3 commits into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

koladilip and others added 3 commits June 19, 2025 08:31
- Add type checking to ensure gender input is a string

- Return null for non-string inputs

- Add comprehensive test cases for type validation

- Add test cases for female variations (woman, female, w, f)

- Add test cases for male variations (man, male, m)

- Add test cases for other variations (other, o)

- Add test cases for invalid inputs and edge cases

- Ensure case insensitivity is properly tested
@coderabbitai

coderabbitai Bot commented Jun 19, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added support for normalizing gender input into standardized codes for improved compatibility.
  • Tests
    • Introduced comprehensive tests to ensure accurate gender normalization and handling of invalid inputs.

Walkthrough

A new utility function, formatGender, was introduced in the Braze destination utilities to standardize gender input values. Existing code in the Braze transformation logic was refactored to use this shared utility. Comprehensive tests were added to validate the normalization logic for various gender representations.

Changes

File(s) Change Summary
src/v0/destinations/braze/util.js Added and exported formatGender utility for gender normalization.
src/v0/destinations/braze/transform.js Removed local formatGender and imported it from the shared utility module.
src/v0/destinations/braze/braze.util.test.js Added test suite for formatGender, covering valid, case-insensitive, and invalid input scenarios.

Sequence Diagram(s)

sequenceDiagram
    participant Input
    participant transform.js
    participant util.js

    Input->>transform.js: Provide gender value
    transform.js->>util.js: Call formatGender(gender)
    util.js-->>transform.js: Return normalized gender code or null
    transform.js-->>Input: Use normalized gender in payload
Loading

Suggested reviewers

  • sivashanmukh
  • krishna2020
  • yashasvibajpai
  • manish339k

Suggestions for improvement:

  • Consider extending formatGender to handle more edge cases or locale-specific gender representations if needed.
  • Ensure that all other modules referencing gender normalization are updated to use the shared utility for consistency.
  • Expand test coverage to include additional languages or abbreviations if the application is internationalized.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3264080 and ab20435.

⛔ Files ignored due to path filters (3)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
📒 Files selected for processing (3)
  • src/v0/destinations/braze/braze.util.test.js (2 hunks)
  • src/v0/destinations/braze/transform.js (1 hunks)
  • src/v0/destinations/braze/util.js (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: Focus on ESLint errors (max 3) and warnings (max 5).

**/*.js: Focus on ESLint errors (max 3) and warnings (max 5).

  • src/v0/destinations/braze/transform.js
  • src/v0/destinations/braze/braze.util.test.js
  • src/v0/destinations/braze/util.js
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
  • GitHub Check: check-health
  • GitHub Check: UT Tests
  • GitHub Check: Check for formatting & lint errors
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (5)
src/v0/destinations/braze/transform.js (1)

47-47: Good refactoring to centralize utility logic.

The addition of formatGender to the import statement correctly supports the code centralization effort, moving the gender formatting logic to a shared utility module.

src/v0/destinations/braze/util.js (2)

32-53: Well-implemented gender normalization utility.

The function provides robust gender formatting for Braze API compatibility with proper type checking, case-insensitive handling, and comprehensive coverage of common gender variations. The logic is clear and the fallback behavior is appropriate.


833-833: Export statement correctly added.

The formatGender function is properly exported following the existing module pattern.

src/v0/destinations/braze/braze.util.test.js (2)

6-6: Import correctly updated for testing.

The addition of formatGender to the import statement is properly structured to support the new test suite.


1940-1977: Excellent test coverage for the formatGender function.

The test suite is comprehensive and well-structured, covering all valid gender variations, case sensitivity, and edge cases including invalid input types. The test descriptions are clear and the assertions appropriately validate the expected behavior.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Jun 19, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.14%. Comparing base (4a61dbb) to head (ab20435).
Report is 44 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4412   +/-   ##
========================================
  Coverage    91.13%   91.14%           
========================================
  Files          638      638           
  Lines        33476    33478    +2     
  Branches      7897     7902    +5     
========================================
+ Hits         30510    30513    +3     
+ Misses        2727     2696   -31     
- Partials       239      269   +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit 5081831 into develop Jun 19, 2025
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.

5 participants