Skip to main content

GitHub PR/Issue management: clone, sync, and iterate on PR/issue descriptions and comments locally, with gist mirroring

Project description

ghpr

GitHub PR/Issue management tool for local iteration with gist mirroring.

Features

  • Clone PR/Issues locally with comments
  • Sync bidirectionally between GitHub and local files
  • Diff local changes vs remote
  • Push updates back to GitHub
  • Gist mirroring for version control and sharing
  • Comment management - edit and sync PR/issue comments

Installation

pip install ghpr-py

Usage

Basic Workflow

# Clone a PR or issue
ghpr clone https://github.com/owner/repo/pull/123
# or
ghpr clone owner/repo#123

# Show differences
ghpr diff

# Push changes
ghpr push

Adding Comments

To add a new comment, create a file starting with new and ending in .md:

# Create a draft comment
echo "My comment text" > new.md

# Commit it
git add new.md
git commit -m "Draft comment"

# Push to GitHub (posts the comment and renames to z{id}-{author}.md)
ghpr push

The push command will:

  1. Post new*.md files as comments to GitHub
  2. Create a commit renaming them to z{comment_id}-{author}.md
  3. Sync to the gist mirror

Uploading Images

# Upload image(s) to the gist and get markdown URLs
ghpr upload screenshot.png
# Output: ![screenshot.png](https://gist.githubusercontent.com/...)

Directory Structure

Cloned PRs and issues are stored as:

gh/123/
  owner-repo#123.md       # Main description
  z3404494861-user.md     # Comments (ID-author format)
  z3407382913-user.md

Since PRs are issues in GitHub's API, we use the same gh/{number}/ pattern for both.

Shell Integration (Optional)

For power users who want shorter aliases, ghpr provides shell integration:

Bash/Zsh

Add to your ~/.bashrc or ~/.zshrc:

eval "$(ghpr shell-integration bash)"

Fish

Add to your ~/.config/fish/config.fish:

ghpr shell-integration fish | source

Available Aliases

After enabling shell integration, you get convenient shortcuts:

ghpri      # ghpr init
ghpro      # ghpr open
ghprog     # ghpr open -g
ghprcr     # ghpr create
ghprsh     # ghpr show
ghprc      # ghpr clone
ghprp      # ghpr push
ghprl      # ghpr pull
ghprd      # ghpr diff
# ... and more

See the full list with:

ghpr shell-integration bash

Development

Repository: runsascoded/ghpr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghpr_py-0.1.2.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghpr_py-0.1.2-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file ghpr_py-0.1.2.tar.gz.

File metadata

  • Download URL: ghpr_py-0.1.2.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ghpr_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9bd6dc0e37d9616927c3d6328d4f06e2d8086f56744a141c612d11e11214528f
MD5 623bf63a0fb298f1cd5b61e7853307ce
BLAKE2b-256 9022d6d5f715bfd73300977cf2fed9c36ff32f75ce63c4f0c100a14209f58ae1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghpr_py-0.1.2.tar.gz:

Publisher: release.yml on runsascoded/ghpr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ghpr_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ghpr_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ghpr_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd49eb3984d2de8102d134faa7a18293f8aba091121d19d0a62a92e518f5ec8
MD5 fb5e50bd752c4a9f919c4fd467fac1cc
BLAKE2b-256 c5e4a8dd5db424a0998c8bf0216f1a8cf1138b6ba8c854fa1871d61e974e86f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghpr_py-0.1.2-py3-none-any.whl:

Publisher: release.yml on runsascoded/ghpr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page