tiktok / sparo

Sparo optimizes performance of Git operations for your large frontend monorepo.
https://tiktok.github.io/sparo/
MIT License
162 stars 8 forks source link

Feat sparo metric #78

Closed chengcyber closed 4 months ago

chengcyber commented 4 months ago

Basic Checks

Have you run rush change for this change?

If No, please run rush change before, this is necessary.

If adding a new feature, the PR's description includes:

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

Summary

  1. Improve the logic to check existence of a branch
  2. Improve the logic to accurately report success data

Detail

  1. git ls-remote --exist-code explicitly returns exit code 2 to indicate the branch is missing remotely. The new logic respects this logic, that says other exit code will be treated the branch exists remotely. CleanShot 2024-06-27 at 16 51 03@2x

  2. Previously, all data are sent via telemetry service. After this PR, data will be sent only for success commands.

How to test it

Local