claude-code-action icon indicating copy to clipboard operation
claude-code-action copied to clipboard

feat: Add automated PR creation functionality for issues

Open tomoish opened this issue 1 year ago • 5 comments

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

tomoish avatar Jun 22 '25 12:06 tomoish

I literally came to this repo to submit this same issue. This would benefit my workflow greatly

guillermo-menjivar avatar Jun 22 '25 14:06 guillermo-menjivar

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.

manwithaplandy avatar Jun 23 '25 21:06 manwithaplandy

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.

t-jimbo avatar Jun 24 '25 08:06 t-jimbo

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

Image

Strajk avatar Sep 03 '25 11:09 Strajk

@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!

vibhor1997a avatar Sep 18 '25 18:09 vibhor1997a