-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - posthog #16560
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
New Components - posthog #16560
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
|
""" WalkthroughThis update introduces four new PostHog action modules for creating queries, retrieving persons, cohorts, and surveys, each leveraging new helper methods for paginated API access in the PostHog app integration. It also increments versions for existing actions and updates dependencies in the package manifest. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ActionModule
participant PostHogApp
participant PostHogAPI
User->>ActionModule: Provide input parameters
ActionModule->>PostHogApp: Call helper method (e.g., iterateResults or createQuery)
PostHogApp->>PostHogAPI: Make API request (e.g., /queries, /persons, /cohorts, /surveys)
PostHogAPI-->>PostHogApp: Return API response (possibly paginated)
PostHogApp-->>ActionModule: Return processed results
ActionModule-->>User: Return action output and summary
Assessment against linked issues
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/posthog/actions/get-cohorts/get-cohorts.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/posthog/actions/get-persons/get-persons.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/posthog/actions/get-surveys/get-surveys.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (2)
✨ Finishing Touches
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. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 3
📜 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 (8)
components/posthog/actions/capture-event/capture-event.mjs(1 hunks)components/posthog/actions/create-query/create-query.mjs(1 hunks)components/posthog/actions/get-cohorts/get-cohorts.mjs(1 hunks)components/posthog/actions/get-persons/get-persons.mjs(1 hunks)components/posthog/actions/get-surveys/get-surveys.mjs(1 hunks)components/posthog/package.json(2 hunks)components/posthog/posthog.app.mjs(3 hunks)components/posthog/sources/new-action-performed/new-action-performed.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (11)
components/posthog/package.json (2)
3-3: Version update reflects the addition of new actionsThe package version increment from 0.1.0 to 0.2.0 is appropriate since this PR introduces multiple new PostHog actions.
16-16: Platform dependency updated to latest versionThe update to @pipedream/platform from ^1.6.4 to ^3.0.3 indicates a significant platform update. This is appropriate, especially if the new actions utilize newer platform capabilities.
components/posthog/actions/capture-event/capture-event.mjs (1)
7-7: Version increment for consistencyThe minor version bump from 0.0.1 to 0.0.2 maintains versioning consistency with the other PostHog components being updated in this PR.
components/posthog/sources/new-action-performed/new-action-performed.mjs (1)
8-8: Version increment for consistencyThe minor version bump from 0.0.1 to 0.0.2 maintains versioning consistency with the other PostHog components being updated in this PR.
components/posthog/actions/get-surveys/get-surveys.mjs (2)
1-38: Well-structured PostHog action componentThe component follows Pipedream's standard structure with proper organization of imports, metadata, and props. The dependency injection of the PostHog app and the hierarchical relationship between organizationId and projectId are correctly implemented.
40-50: Good use of pagination helpersThe use of the
iterateResultshelper with thelistSurveysfunction demonstrates good practice for handling paginated API responses, ensuring all results are collected while respecting the maxResults limit.components/posthog/actions/create-query/create-query.mjs (1)
1-53: Well-structured new PostHog action for creating queriesThe implementation follows Pipedream's action component best practices with clear prop definitions and proper API integration. The component handles the creation of HogQL queries with appropriate project context and optional naming.
components/posthog/posthog.app.mjs (4)
63-69: LGTM: Well-defined maxResults propertyThe addition of a standard maxResults property with appropriate defaults will help maintain consistency across actions.
111-134: LGTM: Well-implemented API methods for listing resourcesThe new methods for listing persons, cohorts, and surveys follow the established pattern and will provide consistent access to PostHog resources.
151-176: LGTM: Efficient pagination implementationThe pagination implementation correctly handles offset-based pagination and respects the maximum results limit.
177-184: LGTM: Helper method for collecting paginated resultsThe iterateResults method provides a convenient way to collect all paginated items into a single array.
GTFalcao
left a comment
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.
LGTM!
Resolves #16533
Summary by CodeRabbit
New Features
Improvements
Chores