Skip to content

Add GET /organizations/:orgId/feature-flags support #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

stanleyphu
Copy link
Contributor

Description

Add GET /organizations/:orgId/feature-flags support

Documentation

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

[x] Yes

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

Copy link

@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.

Greptile Summary

This PR adds support for the GET /organizations/:orgId/feature-flags API endpoint to the WorkOS Ruby SDK. The implementation introduces a new FeatureFlag model class with standard attributes (id, name, slug, description, created_at, updated_at) and a list_organization_feature_flags method in the Organizations module. The changes follow established patterns in the codebase by creating a lightweight model wrapper that includes HashProvider for consistent JSON conversion, implementing the API method using the same request/response handling as other list operations like list_organization_roles, and returning a ListStruct for consistency with other list-based endpoints. The new functionality allows developers to programmatically retrieve feature flags configured for specific organizations through the WorkOS dashboard, extending the SDK's capabilities to include feature flag management alongside existing organization-scoped resources.

Confidence score: 3/5

  • This PR has some implementation issues that should be addressed before merging, including test data mismatches and potential JSON parsing errors
  • Score reflects concerns about hardcoded metadata values, test expectations not matching VCR data, and lack of input validation in the FeatureFlag class
  • Pay close attention to spec/lib/workos/organizations_spec.rb and lib/workos/feature_flag.rb for the test data mismatch and JSON parsing robustness issues

5 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@stanleyphu stanleyphu force-pushed the feat/add-get-flags-for-org-api-support branch 4 times, most recently from 89a15b6 to 3e44bf9 Compare August 4, 2025 17:50
@stanleyphu stanleyphu force-pushed the feat/add-get-flags-for-org-api-support branch from 3e44bf9 to f2d0851 Compare August 4, 2025 18:40
@stanleyphu stanleyphu merged commit fc271a9 into main Aug 5, 2025
2 checks passed
@stanleyphu stanleyphu deleted the feat/add-get-flags-for-org-api-support branch August 5, 2025 01:10
@stanleyphu stanleyphu mentioned this pull request Aug 5, 2025
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.

2 participants