Skip to content

Conversation

@joshjohanning
Copy link
Owner

adding one final enhancement for PR

This pull request improves the validation logic and error messaging for Azure DevOps configuration in the commit validator workflow. The changes ensure that missing configuration is checked for both commit linking and work item validation features, and that error messages are clearer and more consistent. The test suite is updated to reflect these changes and to add coverage for new validation scenarios.

Copilot AI review requested due to automatic review settings January 6, 2026 21:39
Copy link
Contributor

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 pull request enhances Azure DevOps configuration validation by extending the credential check to cover both commit linking and work item validation features. Previously, the validation only checked for Azure DevOps credentials when link-commits-to-pull-request was enabled. Now it also validates credentials when validate-work-item-exists is enabled, ensuring that both features have the necessary configuration before execution.

Key Changes:

  • Consolidated Azure DevOps configuration validation to trigger when either link-commits-to-pull-request or validate-work-item-exists is enabled
  • Improved error messages to dynamically list which configurations are missing and which features require them
  • Updated test assertions to match new error message format and added test coverage for work item validation without credentials

Reviewed changes

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

File Description
src/index.js Refactored Azure DevOps configuration validation to check credentials when either linking or work item validation features are enabled, with improved error messaging that dynamically lists missing configs and relevant features
tests/index.test.js Updated test assertions to match new error message format, enhanced test descriptions for clarity, and added new test case for validating work item existence without credentials
badges/coverage.svg Auto-generated coverage badge updated to reflect new test coverage (80.98% → 81.38%)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@joshjohanning joshjohanning merged commit 3d675be into main Jan 6, 2026
4 checks passed
@joshjohanning joshjohanning deleted the fix/validate-credentials-for-work-item-validation branch January 6, 2026 21:46
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

📦 Draft Release Created

A draft release v3.0.7 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

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