Skip to content

Enhancement: Allow editing existing PRs in auto_pr.zsh #141

@sebastianhuus

Description

@sebastianhuus

Summary/Overview

The auto_pr.zsh script should be enhanced to provide an option for users to edit an existing pull request associated with the current branch, rather than always attempting to create a new one.

Motivation

This feature is needed to address scenarios where:

  • More issues are being fixed by the pull request than initially stated.
  • The user needs to regenerate the pull request content based on recent comments or changes that are not yet reflected.

Proposed Solution

The auto_pr.zsh script should detect if a pull request already exists for the current branch. If one is found, the script should prompt the user with an option to edit the existing pull request. This editing functionality should allow for:

  • Appending or modifying the pull request body to include additional context.
  • Regenerating the pull request content, potentially incorporating new information or addressing previous feedback.

Acceptance Criteria

  • When auto_pr.zsh is executed on a branch that already has an open pull request, the script presents a clear prompt to the user.
  • The prompt offers an option to 'Edit existing PR' or 'Create new PR' (if applicable, or simply exit if editing is the primary goal).
  • If 'Edit existing PR' is selected, the user is guided through a process to modify the PR's title and/or body.
  • The editing process allows for the inclusion of additional issues being fixed.
  • The editing process facilitates regenerating the PR content to reflect recent comments or changes.

Additional Context

This enhancement will improve the flexibility and usability of the auto_pr.zsh script by allowing iterative refinement of pull requests without manual intervention via the GitHub UI.

🤖 Generated with Gemini CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions