Skip to content

Conversation

almaleksia
Copy link
Contributor

@almaleksia almaleksia commented Oct 2, 2025

This PR consolidates tools
get_pull_request
get_pull_request_files
get_pull_request_status
get_pull_request_diff
get_pull_request_reviews
get_pull_request_review_comments

under pull_request_read with method argument:

get
get_files
get_status
get_diff
get_reviews
get_review_comments

Change has been evaluated on curated benchmarks and introduced no regressions to the current behavior accross all models.

@almaleksia almaleksia marked this pull request as ready for review October 6, 2025 12:34
@almaleksia almaleksia requested a review from a team as a code owner October 6, 2025 12:34
@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 12:34
Copy link
Contributor

@Copilot 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 PR consolidates six separate pull request read tools (get_pull_request, get_pull_request_files, get_pull_request_status, get_pull_request_diff, get_pull_request_reviews, get_pull_request_review_comments) into a single unified tool called pull_request_read that uses a method parameter to determine which specific operation to perform.

Key changes:

  • Replaced multiple individual tools with a single consolidated pull_request_read tool
  • Added method-based routing with six supported methods: get, get_files, get_status, get_diff, get_reviews, get_review_comments
  • Updated all test cases to use the new consolidated tool and include the required method parameter

Reviewed Changes

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

Show a summary per file
File Description
pkg/github/tools.go Updated toolset registration to use single PullRequestRead tool instead of six separate tools
pkg/github/pullrequests_test.go Updated all test cases to use new tool name and include required method parameter
pkg/github/pullrequests.go Consolidated six separate tool functions into one PullRequestRead function with method-based routing
pkg/github/toolsnaps/pull_request_read.snap Added snapshot for new consolidated tool
pkg/github/toolsnaps/get_*.snap Removed snapshots for deprecated individual tools
README.md Updated documentation to reflect new consolidated tool structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@LuluBeatson LuluBeatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@almaleksia almaleksia merged commit d0d4b0e into main Oct 7, 2025
16 checks passed
@almaleksia almaleksia deleted the almaleksia/consolidate-pull-requests branch October 7, 2025 09:05
@tonytrg tonytrg mentioned this pull request Oct 8, 2025
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