-
Notifications
You must be signed in to change notification settings - Fork 619
feat: centralized webhooks tabs #7573
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
26c080f
feat: webhooks list in dashboard
arcoraven 42f6d84
feat: webhook analytics tab
arcoraven f054236
Merge remote-tracking branch 'origin/main' into ph/07-04-feat_webhook…
arcoraven c1348e2
Merge remote-tracking branch 'origin/main' into ph/feat-webhooks
arcoraven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import "server-only"; | ||
| import { PostHog } from "posthog-node"; | ||
|
|
||
| let posthogServer: PostHog | null = null; | ||
|
|
||
| function getPostHogServer(): PostHog | null { | ||
| if (!posthogServer && process.env.NEXT_PUBLIC_POSTHOG_KEY) { | ||
| posthogServer = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY, { | ||
| host: "https://us.i.posthog.com", | ||
| }); | ||
| } | ||
| return posthogServer; | ||
| } | ||
|
|
||
| /** | ||
| * Check if a feature flag is enabled for a specific user | ||
| * @param flagKey - The feature flag key | ||
| * @param userEmail - The user's email address for filtering | ||
| */ | ||
| export async function isFeatureFlagEnabled( | ||
| flagKey: string, | ||
| userEmail?: string, | ||
| ): Promise<boolean> { | ||
| try { | ||
| const client = getPostHogServer(); | ||
| if (client && userEmail) { | ||
| const isEnabled = await client.isFeatureEnabled(flagKey, userEmail, { | ||
| personProperties: { | ||
| email: userEmail, | ||
| }, | ||
| }); | ||
| if (isEnabled !== undefined) { | ||
| return isEnabled; | ||
| } | ||
| } | ||
| } catch (error) { | ||
| console.error(`Error checking feature flag ${flagKey}:`, error); | ||
| } | ||
| return false; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Verify the posthog-node package version for security and compatibility.
The addition of
posthog-nodefor server-side PostHog integration is appropriate. Please verify that version^5.3.1is the latest stable version and free from security vulnerabilities.🌐 Web query:
💡 Result:
The latest stable version of the
posthog-nodenpm package is 4.18.0, released on May 27, 2025. (classic.yarnpkg.com)Regarding version 5.3.1, there is no record of such a release in the official PostHog repositories or npm registry. The most recent version in the 5.x.x series is 5.0.0-alpha.1, which is an alpha release and not considered stable. (classic.yarnpkg.com)
Additionally, the PostHog Node.js repository does not have any published security advisories. (github.com)
If you are using version 5.3.1, it may be a custom or unofficial release. In such cases, it's advisable to consult the source from which you obtained this version for any security advisories or updates.
Citations:
Correct posthog-node version in package.json
It looks like
^5.3.1isn’t published on npm—the latest stable is4.18.0. Please update the dependency or confirm the correct source:apps/dashboard/package.json, line 58Suggested change:
If you intended to use a custom or alpha release, document its origin and verify any security advisories with the provider.
📝 Committable suggestion
🤖 Prompt for AI Agents