Skip to content

Conversation

claudiacodacy
Copy link
Contributor

@claudiacodacy claudiacodacy commented Oct 3, 2025

This PR was entirely done with cursor + codex. review with care. <3

adding @nedaKaighobadi to the review because i tried as much as possible to do the same thing here we are doing in VSCode. not sure if it was possible. 🙇


Add Branch State Management with Telemetry

This PR adds intelligent branch state tracking to the Codacy IntelliJ extension. It monitors what type of branch the user is currently working on and sends telemetry data about branch state changes.

Key Changes:

  • 4 Branch States: Tracks if user is on a PR branch, analyzed branch, outdated analyzed branch, or unknown branch
  • Smart Detection: Automatically determines branch state by checking PR status and comparing local commits with Codacy's analysis
  • Telemetry Events: Sends BranchStateChangeEvent when users switch between different branch types
  • New API Integration: Added endpoint to fetch enabled branches from Codacy

What It Does:

  • When you open a repository, it fetches the list of analyzed branches from Codacy
  • Continuously monitors your current branch and determines its state
  • Tracks when you switch between different types of branches (PR → analyzed → unknown, etc.)
  • Sends anonymous telemetry data to help improve the product

Files Changed:

  • Added branch listing API method and response model
  • Enhanced RepositoryManager with state management logic
  • Integrated with existing telemetry system

What's missing:

  • Adding OrgId to all events

@claudiacodacy claudiacodacy changed the title Branch state telemetry feat: Branch state telemetry Oct 3, 2025
@claudiacodacy claudiacodacy changed the title feat: Branch state telemetry feat: branch state telemetry Oct 3, 2025
Copy link
Contributor

@og-pixel og-pixel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, obviously we need to test it first

@og-pixel og-pixel merged commit 63ad42d into master Oct 6, 2025
1 check 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.

2 participants