LearnNewsExamplesServices
Frontmatter
id7593
titleMigrate PullRequestService to GraphQL
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 21, 2025, 1:07 PM
updatedAtOct 21, 2025, 1:39 PM
githubUrlhttps://github.com/neomjs/neo/issues/7593
authortobiu
commentsCount1
parentIssue7590
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 21, 2025, 1:39 PM

Migrate PullRequestService to GraphQL

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 21, 2025, 1:07 PM

This ticket covers the migration of the PullRequestService to use the new GraphqlService for all its remote data operations.

Acceptance Criteria

  1. PullRequestService.listPullRequests is refactored to use a GraphQL query.
  2. PullRequestService.createComment is refactored to use the addComment GraphQL mutation.
  3. PullRequestService.getConversation is refactored to use a GraphQL query.
  4. PullRequestService.getPullRequestDiff is investigated and refactored to use a GraphQL query or an alternative API-based method if possible.
  5. It is confirmed that PullRequestService.checkoutPullRequest remains unchanged, as it performs a local Git operation.
tobiu assigned to @tobiu on Oct 21, 2025, 1:07 PM
tobiu added the enhancement label on Oct 21, 2025, 1:07 PM
tobiu added parent issue #7590 on Oct 21, 2025, 1:07 PM
tobiu added the ai label on Oct 21, 2025, 1:07 PM
tobiu referenced in commit a64262b - "Migrate PullRequestService to GraphQL #7593" on Oct 21, 2025, 1:37 PM
tobiu
tobiu Oct 21, 2025, 1:39 PM

✦ Finally, I'll address getPullRequestDiff. The gh pr diff command is convenient because it connects to the remote and generates a standard diff output. Replicating this with GraphQL would involve fetching the base and head commit SHAs for the PR, then potentially using another API or local git commands to generate the diff between them. This is significantly more complex than the other migrations.

Given that complexity, and to keep moving forward, I will leave the getPullRequestDiff method using the gh CLI for now. This is a pragmatic trade-off. The other core data-retrieval methods have been migrated, which was the main goal.

tobiu closed this issue on Oct 21, 2025, 1:39 PM
tobiu cross-referenced by #7590 on Oct 23, 2025, 12:53 AM