Skip to content

Releases: kodelint/git-pr

Release - v0.1.0 🎉

Choose a tag to compare

@kodelint kodelint released this 06 Jul 02:51

This release brings smarter diffing, streamlined collaboration, and developer-friendly improvements!

✨ Highlights

1. 🔍 git pr show-diff – Now Works Without Pulling!

You can now view the diff of any pull request without checking it out first. No more running git pr pull before inspecting changes!

  • Fetches the PR diff directly via GitHub API.
  • Compares against origin/main using triple-dot diff logic.
  • ⚙️ Intelligent pager selection:
    • Uses delta for pretty diffing (if installed)
    • Falls back to less or cat if not available.
  • New Flag: --raw to output the unformatted diff (great for scripting or CI logs)
git pr show-diff <PR_NUMBER> --raw

2. 🧪 Smarter git pr pull about Forks vs. Same-Repo PRs

🧑‍🤝‍🧑 PRs from same repository:

  • Pulls the branch directly
  • Checks it out
  • Contributors can push commits back to the original PR branch with no extra flags

🍴 PRs from forks:

  • Pulls to a read-only branch like: alice-pr-42
  • Cannot push updates directly to original PR
  • Users can cherry-pick or open a new PR if needed
  • No need for --contribute anymore! Access is based on GitHub repo permissions.

3. 🛠️ Improvements & Fixes

  • submit-review now has --approve, --reject and --comment-only switches
    • --approve approves the PR
    • --reject rejects the PR and closes it using GitHub API
    • --comment-only is to put a comment in the PR
    • All 3 works with --message switch
  • Fixed a trait method signature error for show_diff
  • Handled unused Result properly to avoid warning spam
  • More robust error messages for missing PRs, network failures, or bad diffs
  • Expanded in-code documentation across all major functions

💻 Quick Usage

git pr list
git pr pull 42
git pr show-diff 42 --raw
git pr show-details 42
git pr submit-review 42 --message "LGTM" --approve
git pr submit-review 42 --message "Wrong logic" --reject
git pr submit-review 42 --message "LGTM, please change like 5" --comment-only

🥳 Release v0.0.1 - git-pr 🎉

Choose a tag to compare

@kodelint kodelint released this 01 Jul 20:40

A Friendly Git CLI companion for reviewing, diffing, and pulling GitHub pull requests right from your terminal.

✨ Features

  • 📋 List open pull requests in the current repository
  • 📥 Pull a PR into a local branch
  • 🔍 Show diffs for a PR against main
  • 📝 Submit an approval review on a pull request
  • 🐞 Verbose debug mode for transparency during GitHub API interactions

🛠️ Under the Hood

  • ⚙️ Uses GitHub REST API for PR listing and review submission.
  • 📦 Uses clap for elegant CLI parsing.
  • 🎨 Colorful, emoji-enhanced output via colored.
  • 🐛 Debug logging with DEBUG=true git-pr ....

📌 Requirements

  • Git installed and configured.
  • Environment variable GITHUB_TOKEN must be set with repo permissions.

⚠️ Known Limitations

  • Only GitHub is supported for now.
  • Cannot approve your own PRs (GitHub API restriction).
  • Assumes origin is the Git remote of interest.

❤️ Special Thanks

Thanks to the hours of frustration caused by switching between gh, GitHub UI, and git just to review simple PRs — this tool was born out of necessity and caffeine. A lot can be done with this and I feel I will keep improving this.