feat: Add automated PR creation functionality for issues
Description
Currently, when working on issues, users need to manually create pull requests after implementing changes. This process could be streamlined by automatically generating PRs with appropriate titles and descriptions based on issue content.
Proposed Solution
Add functionality to automatically create pull requests when working on issues, including:
- Automatic PR title generation based on issue title
- Structured PR body with summary and changes sections
Benefits
- Reduces manual effort in creating PRs
- Ensures consistent PR format across the project
- Automatically links PRs to their corresponding issues
- Improves developer workflow efficiency
I literally came to this repo to submit this same issue. This would benefit my workflow greatly
I had Claude Code generate a link that created the PR using URL params that let me create the PR as a workaround, but the ability to do that natively would be awesome.
I’m looking forward to seeing this capability supported natively.
As a workaround I’ve added Bash(gh pr create:*) to allowed_tools and experimented with various prompt wording to get Claude to run gh pr create, but the results are still hit-or-miss.
Another solution is to add mcp__github__create_pull_request to allowed_tools and sth like After you are done, always create a GitHub Pull Request with mcp__github__create_pull_request! to custom_instructions, in claude.yml
mcp__github__create_pull_request should work automatically cause GitHub MCP is configured by default https://github.com/anthropics/claude-code-action/blob/main/src/mcp/install-mcp-server.ts#L199
@Strajk I tried below comment with around ~80-90 issues, but it only worked on 4-5 of them 😅 with v1 as custom_instructions is not there. Are you able to make it work consistently with v1?
@trigger_phrase go through these instructions and resolve this issue. After you are done, always create a GitHub Pull Request with mcp__github__create_pull_request!