Skip to content

Dev#34

Merged
mabd-dev merged 30 commits into
mainfrom
dev
Apr 27, 2026
Merged

Dev#34
mabd-dev merged 30 commits into
mainfrom
dev

Conversation

@mabd-dev
Copy link
Copy Markdown
Owner

No description provided.

mabd-dev and others added 30 commits April 18, 2026 18:28
Skip rendering the remote name in parentheses when:
- There is only one remote and it is named "origin" (the common default)
- The remote name is empty (no remote configured)

Closes #20

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
…kends

Introduces internal/analytics, the thin integration layer that the
full telemetry feature (#25) will build on top of.

- Analytics interface with a single Send(event, properties) method,
  so the rest of the codebase never imports Mixpanel directly.
- MixpanelAnalytics wraps github.com/dukex/mixpanel and sends against
  an 'anonymous' distinctID (persistent identity is handled in the
  telemetry issue).
- StdoutAnalytics prints one '[analytics] event=... properties=...'
  line per event, which is friendly in local dev and CI.
- New(token, debug) picks between them: empty token or debug mode
  routes to stdout; otherwise a real Mixpanel client.
- mixpanelToken is a package-level var in cmd/reposcan, settable via
  -ldflags '-X github.com/mabd-dev/reposcan/cmd/reposcan.mixpanelToken=...'
  so release builds get a real token and local builds fall back
  silently.
- Hidden 'reposcan analytics-test --debug-analytics' subcommand
  emits a test event end-to-end for verification (the #24 checklist
  item 'Send a dummy event in debug mode').

Actual usage event payload, opt-out handling, and persistent
identity stay out of scope per the issue description.

Refs #24
CHANGELOG.md added, latest change first
…face test

Review feedback from @mabd-dev:

1. Swap `github.com/dukex/mixpanel` for the official
   `github.com/mixpanel/mixpanel-go` SDK referenced in
   https://docs.mixpanel.com/docs/tracking-methods/sdks/go.

   The official SDK exposes `NewApiClient(token)` and
   `Track(ctx, []*Event)` instead of the dukex SDK's
   `New(token, "")` / `Track(distinctID, event, *Event)`.
   MixpanelAnalytics now constructs events via
   `client.NewEvent(event, distinctID, properties)` and calls
   `client.Track(context.Background(), []*Event{ev})`. The Analytics
   interface is unchanged, so no callers are affected.

   Also dropped the trailing `var _ = context.Background` line - it
   was a placeholder for the old SDK's missing context support; the
   new SDK takes a real context.Context.

2. Remove `TestAnalytics_InterfaceIsSatisfied` from
   analytics_test.go. The `var _ Analytics = ...` declarations at the
   bottom of analytics.go already enforce this at compile time, so
   the test adds no coverage.

Verified: go build ./..., go vet ./..., go test ./... all pass.
feat(analytics): add Analytics interface with Mixpanel and stdout backends
This script installs the reposcan binary by detecting the OS and architecture, fetching the latest release from GitHub, and moving the binary to a writable directory on the user's PATH.
Added a build job for multiple platforms and updated dependencies installation.
Added installation instructions for the recommended install script.
Removed supported architectures from README.
Co-authored-by: Mahmoud Abdallah <133316956+mabd-dev@users.noreply.github.com>
Co-authored-by: Mahmoud Abdallah <133316956+mabd-dev@users.noreply.github.com>
…-install

Feat/release workflow and install
@mabd-dev mabd-dev merged commit bc583e9 into main Apr 27, 2026
12 checks passed
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.

4 participants