Skip to content

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

This was previously counting characters, not projects.

@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 07:19
@nirinchev nirinchev requested a review from a team as a code owner September 5, 2025 07:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the project counting logic within the MongoDB Atlas project listing tool. The issue was that the code was incorrectly counting characters in a string instead of the actual number of projects returned from the API.

  • Updates the project count calculation to use the actual number of projects from the API response
  • Modifies the test to verify the count against the parsed table data length for accuracy

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/tools/atlas/read/listProjects.ts Fixed project count to use data.results.length instead of rows.length
tests/integration/tools/atlas/projects.test.ts Updated test to validate project count against parsed data length

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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