- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
New Components - launchdarkly #17973
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
Conversation
| WalkthroughThis update introduces several new LaunchDarkly action modules for retrieving and listing projects, environments, feature flags, and members. It also adds new helper methods and pagination logic to the LaunchDarkly app integration. Additionally, version numbers are incremented for multiple actions and sources, and the package version is updated. Changes
 Sequence Diagram(s)sequenceDiagram
    participant User
    participant Action
    participant LaunchDarklyApp
    participant LaunchDarklyAPI
    User->>Action: Trigger action (e.g., List Feature Flags)
    Action->>LaunchDarklyApp: Call helper method (e.g., paginate)
    LaunchDarklyApp->>LaunchDarklyAPI: Perform API request(s) (with pagination)
    LaunchDarklyAPI-->>LaunchDarklyApp: Return paginated data
    LaunchDarklyApp-->>Action: Yield items
    Action-->>User: Return aggregated results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–20 minutes Possibly related PRs
 Suggested labels
 Suggested reviewers
 Poem
 Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
 🚧 Files skipped from review as they are similar to previous changes (1)
 ⏰ 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). (3)
 ✨ Finishing Touches
 🧪 Generate unit tests
 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File ( | 
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
 | 
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
components/launchdarkly/launchdarkly.app.mjs (1)
253-279: Solid pagination implementation with minor suggestions for robustness.The async generator pattern is well-implemented and follows good practices. Consider adding safety checks for edge cases:
- Handle empty
itemsarrays gracefully- Add a maximum iteration limit to prevent infinite loops if the API behaves unexpectedly
- Consider making the page limit configurable rather than hardcoded to 100
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (15)
- components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs(1 hunks)
- components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs(1 hunks)
- components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs(1 hunks)
- components/launchdarkly/actions/get-project/get-project.mjs(1 hunks)
- components/launchdarkly/actions/list-environments/list-environments.mjs(1 hunks)
- components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs(1 hunks)
- components/launchdarkly/actions/list-members/list-members.mjs(1 hunks)
- components/launchdarkly/actions/list-projects/list-projects.mjs(1 hunks)
- components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs(1 hunks)
- components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs(1 hunks)
- components/launchdarkly/launchdarkly.app.mjs(2 hunks)
- components/launchdarkly/package.json(1 hunks)
- components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs(1 hunks)
- components/launchdarkly/sources/new-flag-event/new-flag-event.mjs(1 hunks)
- components/launchdarkly/sources/new-user-event/new-user-event.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: source names in monday.com components don't need to start with "new" if they emit events for updated...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Applied to files:
- components/launchdarkly/sources/new-flag-event/new-flag-event.mjs
- components/launchdarkly/sources/new-user-event/new-user-event.mjs
📚 Learning: in `components/the_magic_drip/sources/common.mjs`, when processing items in `getandprocessdata`, `sa...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Applied to files:
- components/launchdarkly/sources/new-flag-event/new-flag-event.mjs
- components/launchdarkly/sources/new-user-event/new-user-event.mjs
📚 Learning: the `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, an...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
Applied to files:
- components/launchdarkly/sources/new-flag-event/new-flag-event.mjs
- components/launchdarkly/sources/new-user-event/new-user-event.mjs
📚 Learning: when developing pipedream components, do not add built-in node.js modules like `fs` to `package.json...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
- components/launchdarkly/package.json
📚 Learning: "dir" props in pipedream components are hidden in the component form and not user-facing, so they do...
Learnt from: js07
PR: PipedreamHQ/pipedream#17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: "dir" props in Pipedream components are hidden in the component form and not user-facing, so they don't require labels or descriptions for user clarity.
Applied to files:
- components/launchdarkly/package.json
📚 Learning: when exporting a summary message in the `run` method of an action, ensure the message is correctly f...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
- components/launchdarkly/actions/list-projects/list-projects.mjs
- components/launchdarkly/actions/list-environments/list-environments.mjs
- components/launchdarkly/actions/get-project/get-project.mjs
- components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs
- components/launchdarkly/actions/list-members/list-members.mjs
- components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs
📚 Learning: in `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "c...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
- components/launchdarkly/actions/list-projects/list-projects.mjs
- components/launchdarkly/actions/list-environments/list-environments.mjs
- components/launchdarkly/actions/list-members/list-members.mjs
📚 Learning: in the salesloft api integration (components/salesloft/salesloft.app.mjs), the _makerequest method r...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
- components/launchdarkly/actions/list-members/list-members.mjs
🧬 Code Graph Analysis (5)
components/launchdarkly/actions/list-projects/list-projects.mjs (3)
components/launchdarkly/actions/list-environments/list-environments.mjs (2)
params(54-57)
results(69-69)components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs (2)
params(82-87)
results(99-99)components/launchdarkly/actions/list-members/list-members.mjs (2)
params(56-60)
results(71-71)
components/launchdarkly/actions/list-environments/list-environments.mjs (3)
components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs (1)
params(82-87)components/launchdarkly/actions/list-members/list-members.mjs (1)
params(56-60)components/launchdarkly/actions/list-projects/list-projects.mjs (1)
params(55-59)
components/launchdarkly/launchdarkly.app.mjs (2)
components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs (1)
environmentKey(47-52)components/zamzar/zamzar.app.mjs (1)
totalCount(120-131)
components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs (4)
components/launchdarkly/actions/list-environments/list-environments.mjs (2)
params(54-57)
results(69-69)components/launchdarkly/actions/list-members/list-members.mjs (2)
params(56-60)
results(71-71)components/launchdarkly/actions/list-projects/list-projects.mjs (2)
params(55-59)
results(70-70)components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs (1)
flag(41-45)
components/launchdarkly/actions/list-members/list-members.mjs (3)
components/launchdarkly/actions/list-environments/list-environments.mjs (2)
params(54-57)
results(69-69)components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs (2)
params(82-87)
results(99-99)components/launchdarkly/actions/list-projects/list-projects.mjs (2)
params(55-59)
results(70-70)
⏰ 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). (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (20)
components/launchdarkly/launchdarkly.app.mjs (3)
131-137: LGTM!The
maxResultsprop definition is well-structured with appropriate type, default value, and description. The default of 100 aligns with the limit used in the pagination logic.
237-244: LGTM!The
getFeatureFlagStatusmethod follows the established patterns in the codebase with proper parameter destructuring and REST endpoint construction.
245-252: LGTM!The
getProjectmethod is implemented consistently with other methods in the file, using proper parameter destructuring and REST endpoint construction.components/launchdarkly/sources/new-access-token-event/new-access-token-event.mjs (1)
8-8: LGTM!Version increment is appropriate and consistent with other components in this PR.
components/launchdarkly/package.json (1)
3-3: LGTM!The minor version bump from 0.0.1 to 0.1.0 appropriately reflects the addition of new functionality in this PR, following semantic versioning conventions.
components/launchdarkly/actions/evaluate-feature-flag/evaluate-feature-flag.mjs (1)
7-7: LGTM!Version increment is appropriate and maintains consistency with other existing components in this PR.
components/launchdarkly/actions/update-feature-flag/update-feature-flag.mjs (1)
8-8: LGTM!Version increment is appropriate and consistent with the coordinated version updates across existing LaunchDarkly components.
components/launchdarkly/actions/toggle-feature-flag/toggle-feature-flag.mjs (1)
7-7: LGTM! Version bump is consistent with the broader LaunchDarkly integration update.The version increment aligns with the coordinated release of new LaunchDarkly components and capabilities.
components/launchdarkly/sources/new-flag-event/new-flag-event.mjs (1)
8-8: LGTM! Version bump aligns with the LaunchDarkly integration expansion.The version increment is consistent with the coordinated update across LaunchDarkly components.
components/launchdarkly/sources/new-user-event/new-user-event.mjs (1)
8-8: LGTM! Consistent version increment.The version bump is aligned with the broader LaunchDarkly integration update.
components/launchdarkly/actions/list-environments/list-environments.mjs (1)
54-77: LGTM! Well-structured implementation following established patterns.The parameter construction, pagination usage, and result collection follow consistent patterns with other LaunchDarkly list actions. The summary formatting with proper pluralization is a nice touch.
components/launchdarkly/actions/get-project/get-project.mjs (1)
3-25: LGTM! Clean and straightforward implementation.The action follows best practices with proper property definition, clear API method usage, and well-formatted summary export. The implementation is appropriately simple for a single resource retrieval operation.
components/launchdarkly/actions/list-members/list-members.mjs (3)
1-2: LGTM!Import statements are correct and follow standard patterns.
10-46: LGTM!Property definitions are well-structured with appropriate types, descriptions, and options that match the LaunchDarkly API requirements.
47-81: LGTM!The implementation follows best practices with proper input validation, parameter construction, pagination handling, and summary message formatting. The defensive array validation and consistent patterns align well with the other list actions in this PR.
components/launchdarkly/actions/list-projects/list-projects.mjs (1)
1-81: LGTM!This action follows the exact same pattern as the list-members action with appropriate customizations for the projects API endpoint. The expand and sort options are correctly tailored for projects, and the implementation maintains consistency across the LaunchDarkly list actions.
components/launchdarkly/actions/list-feature-flags/list-feature-flags.mjs (2)
10-72: LGTM!Property definitions correctly implement the project/environment dependency relationship and provide comprehensive options specific to feature flags. The structure remains consistent with other list actions while accommodating the additional complexity.
73-109: LGTM!The implementation correctly extends the standard list action pattern to include feature flag specific requirements (projectKey argument and env parameter) while maintaining consistency with the other list actions.
components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs (1)
40-48: ConfirmenvironmentKeyusage in get-feature-flag actionThe
environmentKeyproperty is defined in
components/launchdarkly/actions/get-feature-flag/get-feature-flag.mjs
but never passed tothis.app.getFeatureFlag(). My search across other feature-flag actions didn’t find any calls supplyingenvironmentKey, which suggests the LaunchDarkly API may not require it. Please verify the API’s requirements:
- If the endpoint doesn’t need an environment key, remove the unused
environmentKeyproperty.- If it does, update the call to include
environmentKey: this.environmentKey.components/launchdarkly/actions/get-feature-flag-status/get-feature-flag-status.mjs (1)
40-50: LGTM!This implementation correctly uses all three parameters (projectKey, environmentKey, featureFlagKey) in the API call and provides appropriate summary messaging. The structure is consistent with other get actions.
        
          
                components/launchdarkly/actions/list-environments/list-environments.mjs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      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.
Hi @michelle0927 lgtm! Ready for QA!
| Hi everyone, all test cases are passed! Ready for release! Test report | 
Related issue: #17725
Adds new components to the
launchdarklyapp.Will create follow-up PR to update
launch_darkly_oauthapp after this is published.Summary by CodeRabbit
New Features
Bug Fixes
Chores