This ticket covers refactoring the final service for the github-workflow server, ai/mcp/server/github-workflow/services/pullRequestService.mjs, into a singleton PullRequestService class. This service handles all interactions with GitHub Pull Requests.
Acceptance Criteria
- The file
ai/mcp/server/github-workflow/services/pullRequestService.mjs is renamed to PullRequestService.mjs.
- The content is replaced with a
PullRequestService class that extends Neo.core.Base and is configured as a singleton.
- All existing functions (
listPullRequests, checkoutPullRequest, getPullRequestDiff, createComment, getConversation) are converted into class methods.
- All methods are updated to return a structured error object on failure, instead of throwing an exception.
- The
ai/mcp/server/github-workflow/services/toolService.mjs is updated to use the new PullRequestService class.
- All related tools (
list_pull_requests, checkout_pull_request, etc.) continue to function correctly after the refactoring.
This ticket covers refactoring the final service for the
github-workflowserver,ai/mcp/server/github-workflow/services/pullRequestService.mjs, into a singletonPullRequestServiceclass. This service handles all interactions with GitHub Pull Requests.Acceptance Criteria
ai/mcp/server/github-workflow/services/pullRequestService.mjsis renamed toPullRequestService.mjs.PullRequestServiceclass that extendsNeo.core.Baseand is configured as a singleton.listPullRequests,checkoutPullRequest,getPullRequestDiff,createComment,getConversation) are converted into class methods.ai/mcp/server/github-workflow/services/toolService.mjsis updated to use the newPullRequestServiceclass.list_pull_requests,checkout_pull_request, etc.) continue to function correctly after the refactoring.