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 metric to help assess Atom's reach across various developer ecosystems #98

Merged
merged 3 commits into from Jul 20, 2018

Conversation

Projects
None yet
3 participants
@jasonrudolph
Copy link
Member

jasonrudolph commented Jul 19, 2018

Description of the Change

When a repository is opened in Atom, report a "repository open" event. If the repository is hosted at github.com, gitlab.com, bitbucket.org, visualstudio.com, or on AWS CodeCommit, then include that info in the event; otherwise, report the hosting provider as "other".

This enhancement depends on a new Atom API that allows you to observe each time a repository is opened in Atom (atom.project.observeRepositories). I'll open a pull request in atom/atom soon to add that new API. In the meantime, you can see the initial spike implementation at atom/atom@59dadb2.

Because that API is not yet present in Atom, the implementation in the pull request first checks to see if atom.project.observeRepositories exists (i.e., feature detection). If the API exists, it uses the API to provide the new metric describe above; otherwise, the new metric is not provided.

Verification Process

  • Using a version of Atom that offers the atom.project.observeRepositories API:
    • Open a new blank Atom window (i.e., no projects in the tree-view) and verify that a repository open event is not recorded
    • Open a new Atom window with a root directory that is not a repository and verify that a repository open event is not recorded
    • Open a new Atom window with a root directory that is a repository and verify that a repository open event is recorded
    • Open a new Atom window with a root directory that is a subdirectory of a repository and verify that a repository open event is recorded
    • In an existing Atom window, add a root directory that is not a repository and verify that a repository open event is not recorded
    • In an existing Atom window, add a root directory that is a repository and verify that a repository open event is recorded
    • In an existing Atom window, add a root directory that is a subdirectory of a repository and verify that a repository open event is recorded
    • Add a root directory for a repository whose origin URL points to github.com, and verify that the recorded event specifies the domain as github.com
    • Add a root directory for a repository whose origin URL points to example.com, and verify that the recorded event specifies the domain as other
    • Add a root directory for a brand new repository with no remote URL, and verify that the recorded event specifies the domain as other
  • Using a version of Atom that does not offer the atom.project.observeRepositories API, add a root directory that is a repository and verify that a repository open event is not recorded and that no exceptions occur

jasonrudolph added some commits Jul 18, 2018

Fix test setup
In order to assert that no events were reported, ensure that we're 
starting with an empty collection of events.

@jasonrudolph jasonrudolph requested review from maxbrunsfeld and annthurium Jul 19, 2018

})

it('returns "other" for non-whitelisted domain in oddball URLs', () => {
expect(getDomain('🙀')).toBe('other')

This comment has been minimized.

@daviwil

daviwil Jul 20, 2018

Member

lol

@jasonrudolph jasonrudolph merged commit f65a99e into master Jul 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jasonrudolph jasonrudolph deleted the jr-understand-reach-across-developer-ecosystems branch Jul 20, 2018

@daviwil daviwil referenced this pull request Jul 20, 2018

Closed

Iteration Plan: July 9 - July 20, 2018 #17660

8 of 16 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.