Release/1.3.8#40
Merged
Merged
Conversation
* add no-telemetry cli flag and toml config flag. read and call telemetry if false * send analytics in telemetry.Send * added telemetry message * read/write telemetry.json file * fixed cli-flags test * added tests for telemetry * docs: updated changelog * docs: added telemetry to README.md * removed debug prints * send telemetry in CI * use NoTelemetry instead of Debug in cli-flag test * fix no-telemetry flag name * fix: send erro when not nil * fix test error * send ci to analytics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Greptile Summary
This release (v1.3.8) introduces anonymous telemetry via Mixpanel, a new
--no-telemetryflag and TOML config option, improved install documentation with the curl-based installer, and a full CHANGELOG entry.internal/telemetry): generates a per-user UUID and consent state stored in~/.config/reposcan/telemetry.json; shows a one-time opt-out notice on first interactive run; skips the notice in CI and always sends there. Opt-out is enforced at the call site inrun()beforetelemetry.Sendis invoked.--no-telemetryflag: wired throughmain.go→readFlags→Config.NoTelemetry; also readable fromconfig.tomlviano-telemetry = true.VERSION/ALIASenv vars, a migration guide fromgo install, and the telemetry disclosure section.Confidence Score: 5/5
Safe to merge — the telemetry opt-out path is correctly guarded at the call site and the consent flow is well-tested.
The telemetry logic is straightforward: a simple read/write of a small JSON file, with the opt-out enforced before Send is ever called. No correctness issues were found; only minor documentation and variable-name typos remain.
No files require special attention.
Important Files Changed
telemtryFileName) andexpandPathis applied only inwriteTelemetrybut not inreadTelemetry/fileExists.--no-telemetryflag into config; callstelemetry.Sendafter scan completes, guarded by!configs.NoTelemetry.--no-telemetryflag; file is missing a trailing newline.Sequence Diagram
sequenceDiagram participant User participant rootCmd participant telemetry participant fs as ~/.config/reposcan/telemetry.json participant Mixpanel User->>rootCmd: reposcan [flags] rootCmd->>rootCmd: GenerateScanReport() alt --no-telemetry set rootCmd-->>User: (skip telemetry) else CI env var set rootCmd->>telemetry: Send(token, ...) telemetry->>Mixpanel: Send("usage", props) else interactive run rootCmd->>telemetry: Send(token, ...) telemetry->>fs: getOrCreateTelemetry() fs-->>telemetry: "Telemetry{UUID, Warned}" alt "Warned == false" telemetry-->>User: print consent notice telemetry->>fs: "writeTelemetry(Warned=true)" end telemetry->>Mixpanel: Send("usage", props) end rootCmd-->>User: render outputReviews (2): Last reviewed commit: "fix typos, handle error state" | Re-trigger Greptile