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

Deal with a lot of different edge cases for git URLs #20115

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Dec 7, 2022

Issue: anonymousId wasn't stable due to differences in git URLs, primarily ssh vs https.

What I did

Made a normalizer, deal with a lot of edge cases. There was a single package out there that did (some of) this: https://github.com/npm/normalize-git-url but it is super old and didn't really nail our use case anyway.

How to test

  • See unit tests.
  • Try cloning a repo in a couple ways and see what anon ids you get.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM!

code/lib/telemetry/src/anonymous-id.ts Outdated Show resolved Hide resolved
@tmeasday tmeasday merged commit b88b9c5 into next Dec 7, 2022
@tmeasday tmeasday deleted the tom/sb-980-normalize-http-vs-ssh-git-urls-for branch December 7, 2022 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants