Skip to content

Conversation

beauzeaux
Copy link
Contributor

@beauzeaux beauzeaux commented Jul 29, 2025

  • Add repo_update_pull_request tool for updating PR title, description, draft status, and target branch
  • Update documentation to reflect new tool capabilities
  • Add validation to ensure at least one field is provided for update
  • Support partial updates with optional parameters

GitHub issue number

322

Associated Risks

  • May cause confusion with similar update_pull_request_status and update_pull_request_reviewers, neither of those operations can be accomplished with the underlying API

PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

  • Been using it for a little over a week for personal uses.
  • src/tools/repos.test.ts (some very loose unit tests I let copilot author)

- Add repo_update_pull_request tool for updating PR title, description, draft status, and target branch
- Replace deprecated repo_update_pull_request_description with more flexible solution
- Update documentation to reflect new tool capabilities
- Add validation to ensure at least one field is provided for update
- Support partial updates with optional parameters
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@09ac13c). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #361   +/-   ##
=======================================
  Coverage        ?   75.20%           
=======================================
  Files           ?       12           
  Lines           ?      730           
  Branches        ?      103           
=======================================
  Hits            ?      549           
  Misses          ?      176           
  Partials        ?        5           
Flag Coverage Δ
unittests 75.20% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danhellem danhellem requested review from kboom and nikolapeja6 July 29, 2025 13:01
@danhellem danhellem added Needs Review 👓 needs review by the product team Repos 📁 issue in the repos area labels Jul 29, 2025
@danhellem danhellem linked an issue Jul 29, 2025 that may be closed by this pull request
title: z.string().optional().describe("The new title for the pull request."),
description: z.string().optional().describe("The new description for the pull request."),
isDraft: z.boolean().optional().describe("Whether the pull request should be a draft."),
targetRefName: z.string().optional().describe("The new target branch name (e.g., 'refs/heads/main')."),
Copy link
Member

Choose a reason for hiding this comment

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

Could you also add an optional parameter for status in this tool, and then remove the update_pull_request_status tool - they use the same node API, and it's better for the LLM to keep the number of tools down.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. The description of the tool was a result of me trying to hint the model not to attempt to use this for status. I've removed update_pull_request_status and made the description align with the one used for update_work_item.

Copy link
Member

@nikolapeja6 nikolapeja6 left a comment

Choose a reason for hiding this comment

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

lgtm, thank you @beauzeaux

@nikolapeja6 nikolapeja6 merged commit 78a1e36 into microsoft:main Jul 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review 👓 needs review by the product team Repos 📁 issue in the repos area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add repo_update_pull_request_description tool
5 participants