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

Add git command analytics #7463

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Add git command analytics #7463

merged 1 commit into from
Jan 7, 2022

Conversation

filiptronicek
Copy link
Member

Description

Adds analytic tracking to git commands requiring the git credential manager (remote-facing commands), such as:

  • git clone (for private repositories)
  • git fetch (for private repositories)
  • git pull (for private repositories)
  • git push (for all repositories)

Related Issue(s)

Fixes #6896

How to test

  1. Open a repo in the preview environment: https://track-git-commands.staging.gitpod-dev.com/#https://github.com/gitpod-io/template-python-flask
  2. Open Segment
  3. In the Gitpod workspace, open a terminal and execute a command requiring the cred manager, for instance git clone https://github.com/filiptronicek/test /tmp/repo- note that this will error out, but that doesn't matter, it should still register in the debugger
  4. View the events in Segment, you should see a git_command there somewhere (if none is present, wait a couple of seconds)
  5. Profit 💵

Release Notes

Adds analytic tracking to git commands requiring the git credential manager (remote-facing commands)

Documentation

/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe

@akosyakov
Copy link
Member

akosyakov commented Jan 7, 2022

/werft run

👍 started the job as gitpod-build-ft-track-git-commands.2

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #7463 (f40bd9a) into main (b3fa44b) will decrease coverage by 9.51%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff            @@
##             main   #7463      +/-   ##
=========================================
- Coverage   19.04%   9.53%   -9.52%     
=========================================
  Files           2      18      +16     
  Lines         168    1080     +912     
=========================================
+ Hits           32     103      +71     
- Misses        134     976     +842     
+ Partials        2       1       -1     
Flag Coverage Δ
components-gitpod-cli-app 9.53% <9.09%> (?)
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/gitpod-cli/cmd/credential-helper.go 1.16% <0.00%> (ø)
components/gitpod-cli/cmd/git-track-command.go 8.00% <8.00%> (ø)
components/gitpod-cli/cmd/version.go 40.00% <40.00%> (ø)
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go
components/gitpod-cli/cmd/completion.go 40.00% <0.00%> (ø)
components/gitpod-cli/cmd/open.go 4.54% <0.00%> (ø)
components/gitpod-cli/cmd/sync-await.go 10.52% <0.00%> (ø)
components/gitpod-cli/cmd/root.go 0.00% <0.00%> (ø)
components/gitpod-cli/cmd/forward-port.go 7.50% <0.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3fa44b...f40bd9a. Read the comment docs.

@akosyakov
Copy link
Member

/lgtm
/approve

@roboquat
Copy link
Contributor

roboquat commented Jan 7, 2022

LGTM label has been added.

Git tree hash: 53fce5d043bd8bc2656496658f096492da130ef3

@JanKoehnlein
Copy link
Contributor

/lgtm

@roboquat
Copy link
Contributor

roboquat commented Jan 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akosyakov, JanKoehnlein

Associated issue: #6896

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 4cf9416 into main Jan 7, 2022
@roboquat roboquat deleted the ft/track_git_commands branch January 7, 2022 10:07
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved deployed: webapp Meta team change is running in production release-note size/L team: IDE team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement analytics on git (git commit)
4 participants