Add PR description update support to git_push_to_branch #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Enhanced the
git_push_to_branchtool to support updating PR descriptions when pushing changes to branches with existing pull requests.Changes
Initial Implementation
Slash Command (
.claude/commands/git_push.md)gh pr viewto context gathering to fetch current PR infopr_descriptionparameter documentationConfiguration (
src/config.yaml)pr_descriptionparameter togit_push_to_branchtool definitionImplementation (
src/mcp_server.py)execute_git_push_to_branch()to accept optionalpr_descriptionparametergh pr editif description providedpr_descriptionPR Feedback Fixes
Fail-Fast Enforcement (
src/mcp_server.py:316)pr_descriptionRobust PR Body Handling (
src/mcp_server.py:312-328)--bodyto--body-filefor PR description updatesEmpty Files List Validation (
src/mcp_server.py:287,216,360)Documentation Fix (
.claude/commands/git_push.md:28-29)pr_descriptionto "Optional parameters" sectionBehavior
pr_descriptionis provided and a PR exists for the branch, the PR description is updated via temp filepr_descriptionprovided, behaves exactly as before (no change)Design Philosophy
Simple KISS implementation with proper error handling - no fallbacks or partial success masking. Follows fail-fast principle consistently.