PatchPal is a tool designed to facilitate the "interactive patch add" workflow across multiple repositories.
It allows users to submit patches from various repositories to a centralized server, where they can be reviewed and either accepted or rejected. This is particularly useful for managing large-scale changes across multiple repositories.
❯ patchpal help
Commands:
client run the patchpal client
server run the patchpal server
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose... enable additional log information
-h, --help Print help
-V, --version Print version
❯ patchpal help client
Usage: patchpal client [OPTIONS] [METADATA]
Arguments:
[METADATA] enable additional log information
Options:
-C, --path <PATH> path to the repo
-v, --verbose... enable additional log information
-n, --pr-number <PR_NUMBER> branch identifier (PR number) that identifies a diff
-r, --repo <REPO> repo to check for a diff
-h, --help Print help
To build and run PatchPal, you need to have Cargo & protobuf
installed.
-
Run the server:
cargo run --release -- server
-
Run the client:
cargo run --release -- client
The client can be used to submit patches from either local repositories
(defaults to current path) or GitHub pull requests (uses the gh
CLI tool for
authentication).
-
Local Repository:
patchpal client --path /path/to/repo
-
GitHub Pull Request:
patchpal client --repo owner/repo --pr-number 123
The server listens for incoming patch requests and provides a TUI for reviewing and managing these patches.
patchpal server
The typical workflow involves multiple clients submitting patches to a centralized server. The server then displays these patches in a TUI, where they can be reviewed and either accepted or rejected.
sequenceDiagram
participant Client1
participant Client2
participant Server
participant TUI
Client1->>Server: Submit Patch
Client2->>Server: Submit Patch
Server->>TUI: Display Patch
TUI->>Server: Accept/Reject Patch
Server->>Client1: Patch Accepted/Rejected
Server->>Client2: Patch Accepted/Rejected
Contributions are welcome! Please open an issue or submit a pull request on GitHub.