-
-
Notifications
You must be signed in to change notification settings - Fork 8
fix: display a clear message when there are no commits #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new function was introduced to detect if a Git repository contains any commits. The main commit info retrieval function now checks for existing commits and returns a specific message if none are present. Corresponding unit tests were added and updated to verify this behavior, and minor comment/formatting changes were made in the pre-commit configuration. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant get_commit_info
participant has_commits
participant cmd_output
User->>get_commit_info: Call with format_string, sha
get_commit_info->>has_commits: Check if repo has commits
alt Repo has commits
get_commit_info->>cmd_output: Run git log command
cmd_output-->>get_commit_info: Return commit info
get_commit_info-->>User: Return commit info
else Repo has no commits
get_commit_info-->>User: Return "Repo has no commits yet."
end
Assessment against linked issues
Poem
Warning Review ran into problems🔥 ProblemsCheck-run timed out after 90 seconds. Some checks/pipelines were still in progress when the timeout was reached. Consider increasing the reviews.tools.github-checks.timeout_ms value in your CodeRabbit configuration to allow more time for checks to complete. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Graph Analysis (1)tests/util_test.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (8)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #244 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 290 298 +8
=========================================
+ Hits 290 298 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
close #242
Summary by CodeRabbit