This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
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.
Description of the Change
This PR adds reporting metrics for cloning repos, as well as various context menu actions within the package.
Alternate Designs
This implementation listens to all command dispatch event, filters out the ones triggered via context menus, and acts upon them. The drawback is that it won't be clear exactly which context menu was used to trigger that command. An alternative approach would be to hook into each event we're interested in individually, and reports back if the event came from a context menu, and which one. But this approach would result in the same code scattered all over the place, which isn't ideal either.
Metrics
We can know how much usage context menus get, how discoverable the
clone repo
functionality is.Tests
I only added tests for the clone repo instrumentation, but not the context menu ones as I can't think of how one can test context menus in our situation.
Related Issues
resolves #1727
resolves #1728