Skip to content

return organization_name on OrganizationMembership#574

Open
vivekkhimani wants to merge 1 commit intoworkos:mainfrom
vivekkhimani:vivek/add-organization-name
Open

return organization_name on OrganizationMembership#574
vivekkhimani wants to merge 1 commit intoworkos:mainfrom
vivekkhimani:vivek/add-organization-name

Conversation

@vivekkhimani
Copy link

Description

Fixes #505.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@vivekkhimani vivekkhimani requested a review from a team as a code owner February 25, 2026 08:29
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

This PR adds the organization_name field to the OrganizationMembership model, which exposes the organization's name directly on membership objects.

Changes:

  • Added organization_name: str field to the OrganizationMembership type definition
  • Updated test fixtures and mock data to include the new field

The implementation is straightforward and properly maintains consistency across the type definition, test fixtures, and test data. The field is defined as a required string, which aligns with other required fields like user_id and organization_id.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is additive only, adding a new required field to the model. All test fixtures and mock data have been properly updated to include the new field. The implementation is consistent and follows existing patterns in the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
src/workos/types/user_management/organization_membership.py Added organization_name field to OrganizationMembership model
tests/test_events.py Updated mock event data to include organization_name field
tests/utils/fixtures/mock_organization_membership.py Updated mock fixture to include organization_name field

Last reviewed commit: 85ae3f8

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

OrganizationMembership class does not support organization_name field

1 participant