Use pre-commit built-in environment variables#618
Conversation
Prevent trying to get data by itself.
There was a problem hiding this comment.
Pull request overview
This PR refactors a pre-commit script to use pre-commit's built-in environment variables (PRE_COMMIT_REMOTE_URL, PRE_COMMIT_FROM_REF, PRE_COMMIT_TO_REF) instead of executing git commands directly to retrieve repository information.
Key changes:
- Replaces
git config --get remote.origin.urlwithPRE_COMMIT_REMOTE_URLfor determining the repository URL - Replaces
git log --branches --not --remoteswithgit log "$PRE_COMMIT_FROM_REF".."$PRE_COMMIT_TO_REF"for identifying commits to upload
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Caution Review failedFailed to post review comments WalkthroughThe script Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Prevent trying to get data by itself.