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.

@coveralls
Copy link
Collaborator

coveralls commented Sep 8, 2025

Pull Request Test Coverage Report for Build 17486542708

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 81.188%

Totals Coverage Status
Change from base Build 17476889967: 0.0%
Covered Lines: 4671
Relevant Lines: 5665

💛 - Coveralls

@nirinchev nirinchev merged commit 0dfcdee into main Sep 8, 2025
26 of 29 checks passed
@nirinchev nirinchev deleted the ni/fix-atlas-project-count branch September 8, 2025 16:18
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