···
-
package posthog_service
···
func (n *posthogNotifier) NewFollow(ctx context.Context, follow *models.Follow) {
err := n.client.Enqueue(posthog.Capture{
DistinctId: follow.UserDid,
···
-
func (n *posthogNotifier) CreateString(ctx context.Context, string models.String) {
err := n.client.Enqueue(posthog.Capture{
DistinctId: string.Did.String(),
-
Event: "create_string",
Properties: posthog.Properties{"rkey": string.Rkey},
log.Println("failed to enqueue posthog event:", err)
···
···
+
func (n *posthogNotifier) NewPullClosed(ctx context.Context, pull *models.Pull) {
+
err := n.client.Enqueue(posthog.Capture{
+
DistinctId: pull.OwnerDid,
+
Properties: posthog.Properties{
+
"repo_at": pull.RepoAt,
+
"pull_id": pull.PullId,
+
log.Println("failed to enqueue posthog event:", err)
func (n *posthogNotifier) NewFollow(ctx context.Context, follow *models.Follow) {
err := n.client.Enqueue(posthog.Capture{
DistinctId: follow.UserDid,
···
+
func (n *posthogNotifier) NewString(ctx context.Context, string *models.String) {
err := n.client.Enqueue(posthog.Capture{
DistinctId: string.Did.String(),
Properties: posthog.Properties{"rkey": string.Rkey},
log.Println("failed to enqueue posthog event:", err)
+
func (n *posthogNotifier) NewIssueComment(ctx context.Context, comment *models.IssueComment) {
+
err := n.client.Enqueue(posthog.Capture{
+
DistinctId: comment.Did,
+
Event: "new_issue_comment",
+
Properties: posthog.Properties{
+
"issue_at": comment.IssueAt,
+
log.Println("failed to enqueue posthog event:", err)
+
func (n *posthogNotifier) NewIssueClosed(ctx context.Context, issue *models.Issue) {
+
err := n.client.Enqueue(posthog.Capture{
+
Properties: posthog.Properties{
+
"repo_at": issue.RepoAt.String(),
+
"issue_id": issue.IssueId,
+
log.Println("failed to enqueue posthog event:", err)
+
func (n *posthogNotifier) NewPullMerged(ctx context.Context, pull *models.Pull) {
+
err := n.client.Enqueue(posthog.Capture{
+
DistinctId: pull.OwnerDid,
+
Properties: posthog.Properties{
+
"repo_at": pull.RepoAt,
+
"pull_id": pull.PullId,
+
log.Println("failed to enqueue posthog event:", err)