-
Notifications
You must be signed in to change notification settings - Fork 0
feat!: Prompt Request Result #31
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
base: main
Are you sure you want to change the base?
Conversation
9a97808 to
9fab576
Compare
There was a problem hiding this 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 makes the review service’s TryRequestReview method return structured results and updates all consumers and tests accordingly.
- Changed
TryRequestReviewto return aReviewRequestResultcontaining status and success info - Added
ReviewRequestResultand theReviewPromptStatusenum (with mapping extension) - Updated native prompters, interfaces, tests, docs, and bumped relevant package versions
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ReviewService/ReviewService.cs | Changed TryRequestReview signature and logging to return a result |
| src/ReviewService.Abstractions/ReviewRequestResult.cs | Added new ReviewRequestResult type |
| src/ReviewService.Abstractions/ReviewPromptStatus.cs | Introduced ReviewPromptStatus enum |
| src/ReviewService.Abstractions/IReviewService.cs | Updated interface to return ReviewRequestResult |
| src/ReviewService.NativePrompters/ReviewStatus.Extensions.cs | Added mapping from native ReviewStatus to ReviewPromptStatus |
| src/ReviewService.Tests/ReviewServiceShould.cs | Refactored tests to assert on new return type and use NSubstitute |
| README.md | Updated example usage to handle the new result type |
| BREAKING_CHANGES.md | Documented breaking change for TryRequestReview |
Comments suppressed due to low confidence (2)
README.md:66
- There's an extra space between '(' and '$' in the interpolated string, which will not compile. It should be
Console.WriteLine($"Review request status: {result.Status}.");.
Console.WriteLine( $ "Review request status: {result.Status}.");
src/ReviewService.Tests/ReviewServiceShould.cs:262
- [nitpick] Consider verifying that
_reviewPrompterMock.TryPrompt()was invoked exactly once when conditions are satisfied in this test to ensure the prompter is exercised correctly.
Assert.False(result.IsSuccessful);
GitHub Issue: #
Proposed Changes
What is the current behavior?
The 'IReviewService.TryRequestReview' doesn't return a result.
What is the new behavior?
The 'IReviewService.TryRequestReview' now returns a result.
Impact on version
buildfolder was changed..githubfolder was changed.Checklist
Please check that your PR fulfills the following requirements:
Other information