Skip to content

Conversation

@newhook
Copy link
Owner

@newhook newhook commented Jan 12, 2026

Summary

This PR adds a new task type update-pr-description that allows Claude Code to update an existing PR's title and description after the PR has been created. This is useful when PRs need their descriptions revised based on additional context or changes.

Changes

New Files

  • internal/claude/templates/update-pr-description.tmpl: Template that guides Claude Code through updating a PR description, including:
    • Checking work and task details
    • Reviewing git log and diff
    • Creating a comprehensive PR description
    • Using gh pr edit to update the PR

Modified Files

  • cmd/run.go: Added case handler for update-pr-description task type that validates the work has a PR URL and builds the appropriate prompt
  • internal/claude/runner.go:
    • Added embedded template for update-pr-description.tmpl
    • Added BuildUpdatePRDescriptionPrompt() function to generate prompts for this task type
  • internal/github/pr.go: Added UpdatePRInDir() function to update PR title and body using gh pr edit

Issues Resolved

  • ac-qu0: Add a task to update a PR description

Testing

The implementation follows existing patterns for task types (estimate, implement, review, pr). The new task type:

  • Validates that a PR URL exists before attempting to update
  • Uses the established template-based prompt generation
  • Integrates with the existing gh CLI for PR operations

Notes

This task type is designed to be used after a PR has been created, allowing for PR description updates when:

  • The initial auto-generated description needs refinement
  • Additional context becomes available after initial PR creation
  • Multiple works or complex changes need better documentation

newhook and others added 3 commits January 12, 2026 14:21
- Add UpdatePRInDir function to internal/github/pr.go for updating PR
  title and body via gh pr edit
- Create update-pr-description.tmpl template with instructions for
  Claude to update existing PR descriptions
- Add BuildUpdatePRDescriptionPrompt function in runner.go to build
  prompts for the new task type
- Add case handling in cmd/run.go processTaskInWork for the new
  update-pr-description task type

Closes: ac-qu0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@newhook newhook merged commit fb3a690 into main Jan 12, 2026
newhook added a commit that referenced this pull request Jan 12, 2026
* Add update-pr-description task type

- Add UpdatePRInDir function to internal/github/pr.go for updating PR
  title and body via gh pr edit
- Create update-pr-description.tmpl template with instructions for
  Claude to update existing PR descriptions
- Add BuildUpdatePRDescriptionPrompt function in runner.go to build
  prompts for the new task type
- Add case handling in cmd/run.go processTaskInWork for the new
  update-pr-description task type

Closes: ac-qu0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* updates

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@newhook newhook deleted the feat/add-a-task-to-update-a-pr-description-3 branch January 16, 2026 01:43
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