Skip to content

Fix issue #36: Improve thread matching logic for PR comments#62

Open
ajeckmans wants to merge 1 commit intomainfrom
fix-thread-matching
Open

Fix issue #36: Improve thread matching logic for PR comments#62
ajeckmans wants to merge 1 commit intomainfrom
fix-thread-matching

Conversation

@ajeckmans
Copy link
Owner

This PR fixes issue #36 where the Azure DevOps extension fails to determine the correct thread to update when comment content doesn't match exactly.

Changes

  • Enhanced the updatePullRequestThreads function in format-check.ts to include fallback thread matching
  • Added logic to match threads by file path, diagnostic ID, and line number when exact content matching fails
  • Added proper TypeScript type safety for comment content handling
  • Created comprehensive tests to verify the improved thread matching works correctly

Problem Solved

The extension now properly updates existing threads even when comment content format varies slightly, such as when the filename is not included in the comment. This makes the PR comment handling more robust and reliable.

Testing

  • All existing tests pass
  • Added new test case specifically for the improved thread matching logic
  • Verified that existing threads are updated instead of creating duplicates

@sonarqubecloud
Copy link

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