Skip to content

Release/1.3.8#40

Merged
mabd-dev merged 11 commits into
mainfrom
release/1.3.8
May 21, 2026
Merged

Release/1.3.8#40
mabd-dev merged 11 commits into
mainfrom
release/1.3.8

Conversation

@mabd-dev
Copy link
Copy Markdown
Owner

@mabd-dev mabd-dev commented May 21, 2026

Greptile Summary

This release (v1.3.8) introduces anonymous telemetry via Mixpanel, a new --no-telemetry flag and TOML config option, improved install documentation with the curl-based installer, and a full CHANGELOG entry.

  • Telemetry system (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 in run() before telemetry.Send is invoked.
  • --no-telemetry flag: wired through main.goreadFlagsConfig.NoTelemetry; also readable from config.toml via no-telemetry = true.
  • Documentation: README and AGENTS.md document the curl installer, VERSION/ALIAS env vars, a migration guide from go 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

Filename Overview
internal/telemetry/telemetry.go New telemetry module: sends anonymous usage via Mixpanel, persists user UUID and consent state in ~/.config/reposcan/telemetry.json. Minor variable name typo (telemtryFileName) and expandPath is applied only in writeTelemetry but not in readTelemetry/fileExists.
internal/telemetry/telemetry_test.go Comprehensive test suite for the telemetry package; covers all code paths including CI bypass, first-run warning, file errors, and analytics dispatch.
cmd/reposcan/rootCmd.go Wires --no-telemetry flag into config; calls telemetry.Send after scan completes, guarded by !configs.NoTelemetry.
AGENTS.md Adds install-script example with VERSION/ALIAS env vars; contains a documentation typo ("latests" instead of "latest").
docs/cli-flags.md Documents the new --no-telemetry flag; 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 output
Loading

Reviews (2): Last reviewed commit: "fix typos, handle error state" | Re-trigger Greptile

mabd-dev and others added 10 commits May 18, 2026 07:44
* 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
Comment thread internal/telemetry/telemetry.go
Comment thread internal/telemetry/telemetry.go
Comment thread internal/telemetry/telemetry.go
Comment thread README.md Outdated
Comment thread internal/telemetry/telemetry_test.go Outdated
@mabd-dev mabd-dev merged commit ac54984 into main May 21, 2026
6 checks passed
@mabd-dev mabd-dev deleted the release/1.3.8 branch May 21, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant