Releases: kodelint/git-pr
Releases · kodelint/git-pr
Release list
Release - v0.1.0 🎉
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
lessorcatif not available.
- New Flag:
--rawto 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
--contributeanymore! Access is based on GitHub repo permissions.
3. 🛠️ Improvements & Fixes
submit-reviewnow has--approve,--rejectand--comment-onlyswitches--approveapproves the PR--rejectrejects the PR and closes it using GitHub API--comment-onlyis to put a comment in the PR- All 3 works with
--messageswitch
- 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 🎉
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_TOKENmust 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.