-
Notifications
You must be signed in to change notification settings - Fork 22
Overhaul: Bump elixir implementation and add comprehensive code coverage. #67
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
base: main
Are you sure you want to change the base?
Conversation
Hydepwns
commented
May 14, 2025
- Expanded @moduledoc for WorkOS.Organizations with a clear overview and comprehensive usage examples. - Clarified docstrings for function parameters. - No functional changes.
…les - Expanded @moduledoc for WorkOS.Organizations with a clear overview and comprehensive usage examples. - Clarified docstrings for function parameters. - No functional changes.
…ameter validation - Added tests for API error responses, missing required parameters, and empty list handling in WorkOS.Organizations. - Updated create_organization and update_organization to return {:error, :missing_name} if :name is missing, instead of raising. - Improves robustness and user experience for the Organizations API.
…ing, docs, and coverage
…ng behaviour/callbacks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request overhauls the Elixir SDK documentation and CI workflow configurations with expanded module documentation and improved code coverage reporting.
- Added a Codecov badge to README.md for enhanced visibility of test coverage.
- Updated CI workflow: switched branch reference from master to main, bumped the Ubuntu runner version, and integrated new Codecov actions for uploading test results and coverage reports.
Reviewed Changes
Copilot reviewed 20 out of 38 changed files in this pull request and generated no comments.
File | Description |
---|---|
README.md | Added a Codecov badge and removed a stray header line. |
.github/workflows/main.yml | Updated CI configurations including Ubuntu version bump and Codecov upload steps. |
Files not reviewed (18)
- lib/workos/castable.ex: Language not supported
- lib/workos/client.ex: Language not supported
- lib/workos/organizations.ex: Language not supported
- lib/workos/sso.ex: Language not supported
- lib/workos/user_management/multi_factor/sms.ex: Language not supported
- lib/workos/user_management/multi_factor/totp.ex: Language not supported
- lib/workos/user_management/organization_membership.ex: Language not supported
- lib/workos/user_management/reset_password.ex: Language not supported
- lib/workos/user_management/user.ex: Language not supported
- mix.exs: Language not supported
- test/support/audit_logs_client_mock.ex: Language not supported
- test/support/directory_sync_client_mock.ex: Language not supported
- test/support/directory_sync_client_mock_test.exs: Language not supported
- test/support/events_client_mock.ex: Language not supported
- test/support/organization_domains_client_mock.ex: Language not supported
- test/support/organizations_client_mock.ex: Language not supported
- test/support/passwordless_client_mock.ex: Language not supported
- test/support/portal_client_mock.ex: Language not supported
Comments suppressed due to low confidence (1)
README.md:37
- [nitpick] The removal of the stray '###' markdown header just above the SDK Versioning section may have been unintentional. Please confirm if this deletion was deliberate.
## SDK Versioning
:user | ||
] | ||
|
||
@impl true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can have a protocol to cast to map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added Mappable protocol for struct→map conversion + fixed missing Castable behaviours. 8 tests passing.
- Add WorkOS.Mappable protocol providing standard struct-to-map conversion - Implement Mappable protocol for User and ResetPassword structs - Add missing @behaviour WorkOS.Castable to User and ResetPassword structs - Include comprehensive test coverage for all protocol functionality The Mappable protocol addresses the need for a standardized way to convert WorkOS structs to plain maps, useful for JSON serialization, API responses, and other cases requiring map representations of struct data. Features: - to_map/1: Convert single struct to map - to_map_list/1: Convert list of structs to list of maps - Handles nil values gracefully - Uses Map.from_struct/1 for clean conversion Usage: user_map = WorkOS.Mappable.to_map(user) users_maps = WorkOS.Mappable.to_map_list([user1, user2])