Skip to content

[Feature] Allow creating PRs from formatted patches #13508

Open
@Seirdy

Description

@Seirdy

Requested feature

git format-patch turns a commit into a patch ready to email. These patches can be applied by the recipient with git am. It would be nice if Gitea could allow uploading a formatted patch to create a PR

Rationale

1. Convenience

Creating a PR with formatted patches simplifies the contribution process.

The existing flow:

  1. Fork the repo
  2. Clone the fork
  3. (optional, recommended) check out a new branch
  4. Make commits
  5. Push commits
  6. Click a link to open an online form for a new PR
  7. Fill out the PR form
  8. Submit the PR

The flow that this change will allow:

  1. Clone the upstream repo (often already done)
  2. (optional, recommended) check out a new branch
  3. Make commits
  4. git format-patch
  5. Drag and drop those patch files onto the repo
  6. Confirm and submit.

2. Allows contribution without a Gitea account

The best part is that a Gitea admin and repo owner could allow patch files to be submitted without an account, significantly lowering the barrier to entry.

This can also be a big step towards the overall goal of federated PRs by taking the email approach. See #13442 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions