Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: report correct number of projects #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nirinchev wants to merge 1 commit into main
base: main
Choose a base branch
Loading
from ni/fix-atlas-project-count

Conversation

Copy link
Collaborator

@nirinchev nirinchev commented Sep 5, 2025

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
Reviewers

Copilot code review Copilot Copilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /