Skip to content

connor15mcc/patchpal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example patchpal server

PatchPal

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.

Usage

❯ 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

Installation

To build and run PatchPal, you need to have Cargo & protobuf installed.

  1. Run the server:

    cargo run --release -- server
  2. Run the client:

    cargo run --release -- client

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

Server

The server listens for incoming patch requests and provides a TUI for reviewing and managing these patches.

patchpal server

Workflow

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
Loading

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

About

Patchpal: a tool for "interactive patch add" across many repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages