Skip to content
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

[MM51547] Fix telemetry for gitlab and add account connected event #365

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

m1lt0n
Copy link
Contributor

@m1lt0n m1lt0n commented Mar 28, 2023

Summary

  • Fix telemetry not being sent for gitlab.
  • Send account connected event

Ticket Link

https://mattermost.atlassian.net/browse/MM-51547

@m1lt0n m1lt0n requested review from trilopin and removed request for spirosoik March 28, 2023 10:53
@m1lt0n m1lt0n self-assigned this Mar 28, 2023
@m1lt0n m1lt0n added the 2: Dev Review Requires review by a core committer label Mar 28, 2023
@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.16 ⚠️

Comparison is base (69abca9) 32.33% compared to head (d110468) 32.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
- Coverage   32.33%   32.17%   -0.16%     
==========================================
  Files          21       21              
  Lines        3451     3468      +17     
==========================================
  Hits         1116     1116              
- Misses       2225     2242      +17     
  Partials      110      110              
Impacted Files Coverage Δ
server/api.go 23.04% <0.00%> (-0.10%) ⬇️
server/configuration.go 36.50% <0.00%> (+1.12%) ⬆️
server/plugin.go 15.69% <0.00%> (ø)
server/telemetry.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -400,6 +400,8 @@ func (p *Plugin) completeConnectUserToGitlab(c *Context, w http.ResponseWriter,
}
}

p.TrackUserEvent("account_connected", userID, nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister is this the most proper/accurate place or should it be within the else block with the welcome message?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct. If it's in the else block, it doesn't get tracked if the wizard is used.

@m1lt0n m1lt0n added this to the v1.6.1 milestone Mar 28, 2023
Copy link
Contributor

@trilopin trilopin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @m1lt0n

The code is fine and the logs are written correctly. My only doubt is the pluginapi dep version in go.mod. I wonder if this is being reused from the version downloaded by GitHub plugin.

Screenshot 2023-03-28 at 13 16 09

go.sum Show resolved Hide resolved
Copy link
Member

@spirosoik spirosoik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, let's fix the lint

@m1lt0n
Copy link
Contributor Author

m1lt0n commented Mar 28, 2023

@spirosoik done

@m1lt0n m1lt0n requested a review from spirosoik March 28, 2023 12:27
@m1lt0n m1lt0n modified the milestones: v1.6.1, v1.7.0 Mar 28, 2023
Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@hanzei hanzei removed the request for review from mickmister March 28, 2023 15:27
@m1lt0n m1lt0n added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Mar 28, 2023
@m1lt0n m1lt0n merged commit 90ee5f4 into master Mar 28, 2023
@m1lt0n m1lt0n deleted the MM-51547 branch March 28, 2023 15:34
@mickmister mickmister mentioned this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants