Add support for tracking Continuous Integration vendors with telemetry#12180
Conversation
🦋 Changeset detectedLatest commit: d6ab2c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…checks-if-cli-is-running-in-continuous
|
|
||
| // list copied from Turborepo | ||
| // https://github.com/vercel/turborepo/blob/663d3ffdc5b1a4a93353ed408c0b6a653fd89a9f/crates/turborepo-ci/src/vendors.rs#L33C13-L678C14 | ||
| export const VENDORS: Vendor[] = [ |
There was a problem hiding this comment.
We may want to consider using ci-info package instead of maintaining this ourselves.
There was a problem hiding this comment.
After your suggestion, @trek and I checked out ci-info. The main problem is that it decides whether you're in CI at package import time, which makes it impossible to test well.
In addition, the most useful feature, ci.name does not have a guarantee of a stable name, which means that we might arbitrarily start collecting a previous CI system under a new name without warning at some point in the future, making it difficult or impossible to compare historical and new data.
For these reasons, along with the relative small size of the CI checking function, I think it's worthwhile to retain a locally implemented, testable version of the logic.
There was a problem hiding this comment.
We saw that some other Vercelians have committed to the project though. We might be able to PR having stable identifiers and swap out our custom solution for the library if we can get a consistent value in the future.
There was a problem hiding this comment.
watson/ci-info#130 we can see if the author is amenable
There was a problem hiding this comment.
You could now do ci.id to get the vendor constant. available in v4.1.0
…checks-if-cli-is-running-in-continuous
…checks-if-cli-is-running-in-continuous
…checks-if-cli-is-running-in-continuous
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/[email protected] ### Patch Changes - add support for `images.localPatterns` ([#12195](#12195)) ## [email protected] ### Patch Changes - Add a command for enabling and disabling telemetry. Telemetry collection is not currently enabled and when it is, will be a major version bump for the CLI. ([#12207](#12207)) - [cli] Remove incorrect `--json` flag on `vercel alias` ([#12198](#12198)) - Standardize most error output through `output.error` ([#12012](#12012)) - Replace `psl` with `tldts` for domain parsing ([#12174](#12174)) - add support for `images.localPatterns` ([#12195](#12195)) - [cli] add telemetry tracking to `alias ls` ([#12194](#12194)) - Add support for tracking Continuous Integration vendors with telemetry ([#12180](#12180)) - Add session id to events ([#12179](#12179)) - Updated dependencies \[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Replace `@zeit/fetch` usage with `node-fetch` ([#12171](#12171)) - Updated dependencies \[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Link to docs ([#12216](#12216)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - add support for `images.localPatterns` ([#12195](#12195)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Add a command for enabling and disabling telemetry. Telemetry collection is not currently enabled and when it is, will be a major version bump for the CLI. ([#12207](#12207)) - Updated dependencies \[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/[email protected] ### Patch Changes - add support for `images.localPatterns` ([#12195](vercel/vercel#12195)) ## [email protected] ### Patch Changes - Add a command for enabling and disabling telemetry. Telemetry collection is not currently enabled and when it is, will be a major version bump for the CLI. ([#12207](vercel/vercel#12207)) - [cli] Remove incorrect `--json` flag on `vercel alias` ([#12198](vercel/vercel#12198)) - Standardize most error output through `output.error` ([#12012](vercel/vercel#12012)) - Replace `psl` with `tldts` for domain parsing ([#12174](vercel/vercel#12174)) - add support for `images.localPatterns` ([#12195](vercel/vercel#12195)) - [cli] add telemetry tracking to `alias ls` ([#12194](vercel/vercel#12194)) - Add support for tracking Continuous Integration vendors with telemetry ([#12180](vercel/vercel#12180)) - Add session id to events ([#12179](vercel/vercel#12179)) - Updated dependencies \[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Replace `@zeit/fetch` usage with `node-fetch` ([#12171](vercel/vercel#12171)) - Updated dependencies \[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Link to docs ([#12216](vercel/vercel#12216)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - add support for `images.localPatterns` ([#12195](vercel/vercel#12195)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Add a command for enabling and disabling telemetry. Telemetry collection is not currently enabled and when it is, will be a major version bump for the CLI. ([#12207](vercel/vercel#12207)) - Updated dependencies \[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add a method for tracking whether the CLI is running in a Continuous Integration system, and if so, which one.