Skip to content

Conversation

@Tiberriver256
Copy link
Owner

This PR increases the code coverage to exceed the 80% threshold for all metrics. Key improvements: Fixed failing tests in the auth module by adding proper mocks for getLocationsApi, enhanced client.ts test coverage with comprehensive tests for all API methods, improved error formatting test coverage with edge case handling, fixed TypeScript errors, and enhanced server test improvements. Current coverage metrics: Statement coverage: 94.65%, Branch coverage: 83.33%, Function coverage: 97.56%, Line coverage: 94.65%.

This PR increases the code coverage to exceed the 80% threshold for all metrics. Key improvements: Fixed failing tests in the auth module by adding proper mocks for getLocationsApi, enhanced client.ts test coverage with comprehensive tests for all API methods, improved error formatting test coverage with edge case handling, fixed TypeScript errors, and enhanced server test improvements. Current coverage metrics: Statement coverage: 94.65%, Branch coverage: 83.33%, Function coverage: 97.56%, Line coverage: 94.65%.
Update import statement for Azure DevOps configuration type from `AzureDevOpsConfigs` to `AzureDevOpsConfig` to align with TypeScript naming best practices
Copy link

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.

PR Overview

This PR increases test coverage across the Azure DevOps API integration by addressing failing tests and improving error handling in the authentication and client modules. Key changes include:

  • Adding comprehensive tests and proper mocks for Azure DevOps API methods.
  • Enhancing error formatting and validation in the authentication and API client modules.
  • Updating server transport connection and documentation.

Reviewed Changes

File Description
src/api/client.ts Implements API client methods with improved error wrapping.
src/api/auth.ts Adds PAT-based authentication with validation and error handling.
tests/unit/api/auth.test.ts Introduces tests for authentication error conditions and PAT format.
tests/unit/api/client.test.ts Enhances test coverage for all API client getters and error handling.
tests/unit/api/errors.test.ts Verifies behavior and formatting for all custom error classes.
tests/unit/server.test.ts Provides extensive tests for server initialization and tool handlers.
src/api/README.md Documents module usage, authentication, and API access examples.
src/server.ts Updates transport connection logic and related error logging.
project-management/task-management/*.md Updates task management documentation and status tracking.

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

Comments suppressed due to low confidence (1)

tests/unit/server.test.ts:89

  • Consider standardizing the error messages for organization URL validation. One test expects 'Invalid organization URL' while another expects 'Invalid organization URL domain'.
expect(() => new AzureDevOpsServer(invalidConfig)).toThrow('Invalid organization URL');

- Add `inspector` npm script to run MCP inspector with built project
- Update `doing.md` with detailed task for fixing MCP server implementation
- Provide comprehensive research notes on current server implementation issues
@Tiberriver256 Tiberriver256 merged commit 26ef8cc into main Mar 1, 2025
1 check passed
@Tiberriver256 Tiberriver256 deleted the task-0.9-pat-auth branch March 1, 2025 01:53
Tiberriver256 pushed a commit that referenced this pull request Nov 19, 2025
* feat(repositories): support diff commits and list branch commits

* feat: support pull request tags

* fix: validate deletion patches before removing files

* feat: improve tool description for agents, documentation and delete file unit test
Tiberriver256 added a commit that referenced this pull request Nov 19, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.1.43](mcp-server-azure-devops-v0.1.42...mcp-server-azure-devops-v0.1.43)
(2025-11-19)


### Features

* - adding a pullRequestId filter in - adding source and target …
([#12](#12))
([f33e557](f33e557))
* add publishing configuration
([c058e59](c058e59))
* add pull request checks tool
([#11](#11))
([6c1dfd5](6c1dfd5))
* add repository tree and branch/commit tools
([a95e6f2](a95e6f2))
* added prepack script to ensure the binary is built and marked
executable before publishing
([757fea8](757fea8))
* improve commit workflow and add branch commit listing tool
([#7](#7))
([867bbc8](867bbc8))
* include file diffs in pull request changes
([#3](#3))
([0335c68](0335c68))
* provide simpler search/replace functionality for the create_commit
tool
([1d1ec3f](1d1ec3f))
* version bump to 0.1.45
([67e7a3d](67e7a3d))


### Bug Fixes

* **ci:** update workflow to use pull_request_target and latest checkout
action
([fb109a7](fb109a7))
* clarify instruction on how to use the create_commit tool
([bd82c00](bd82c00))
* clarify instruction on how to use the create_commit tool
([167893e](167893e))
* **deps:** address high vulnerability without breaking changes
([#4](#4))
([cb20e2d](cb20e2d))
* **pull-requests:** include diff content in pull request changes
([#6](#6))
([d48aacc](d48aacc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Micah Rairdon <[email protected]>
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