Add badges to README (tests, Java, LeetCode) – Issue #7#19
Add badges to README (tests, Java, LeetCode) – Issue #7#19HoudaBelhad wants to merge 4 commits intoyamcodes:mainfrom
Conversation
Added badges for tests, Java version, and LeetCode.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughAdds a GitHub Actions CI workflow that runs on push and PRs to main using JDK 21 and Maven tests, and inserts three status/reference badges (Tests, Java, LeetCode) at the top of the README. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- Line 3: Replace the hardcoded static badge image string
("") with a
dynamic GitHub Actions workflow status badge: use the actions badge URL pattern
for your repo and workflow file
(https://github.com/<owner>/<repo>/actions/workflows/<workflow_file>.yml/badge.svg)
and update the markdown to link the badge to the workflow run page
(https://github.com/<owner>/<repo>/actions/workflows/<workflow_file>.yml) and
adjust alt text (e.g., "Tests") so the README shows real CI status instead of
always "passing".
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
1-24: CI workflow structure looks good overall.Standard setup with proper checkout, JDK setup, Maven caching, and batch-mode test execution. A couple of observations:
Java version mismatch with project guidelines: The project's build guidelines specify Java 25 (LTS), but this workflow uses JDK 21. If the project has moved to Java 25, update accordingly:
- java-version: '21' + java-version: '25'Consider pinning action versions to full SHAs for supply-chain security (optional for a personal repo).
Based on learnings: "Build project with Java 25 (LTS) version."
README.md
Outdated
| @@ -1,5 +1,9 @@ | |||
| # LeetCode Solutions | |||
|
|
|||
|  | |||
There was a problem hiding this comment.
Tests badge is static and will always show "passing" regardless of actual CI status.
Since this PR also adds a GitHub Actions CI workflow, use the dynamic workflow status badge instead of a hardcoded static one. The current badge is misleading — it will still show "passing" even when the build is broken.
Proposed fix: use a dynamic GitHub Actions status badge
-
+[](https://github.com/yamcodes/leetcode-solutions-java/actions/workflows/ci.yml)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
|  | |
| [](https://github.com/yamcodes/leetcode-solutions-java/actions/workflows/ci.yml) |
🤖 Prompt for AI Agents
In `@README.md` at line 3, Replace the hardcoded static badge image string
("") with a
dynamic GitHub Actions workflow status badge: use the actions badge URL pattern
for your repo and workflow file
(https://github.com/<owner>/<repo>/actions/workflows/<workflow_file>.yml/badge.svg)
and update the markdown to link the badge to the workflow run page
(https://github.com/<owner>/<repo>/actions/workflows/<workflow_file>.yml) and
adjust alt text (e.g., "Tests") so the README shows real CI status instead of
always "passing".
There was a problem hiding this comment.
Thanks @HoudaBelhad, Looks generally very good! Couple small notes, and please resolve conflicts so we can get this PR ready to merge!
| [](#contributors) | ||
|  | ||
|  | ||
|  |
There was a problem hiding this comment.
(Nit) I would use the official LeetCode shields.io logo, either:
|  | |
|  |
or
|  | |
|  |
There was a problem hiding this comment.
This file already exists on main, but according to the PR it's being "added".
This usually happens when branching off an outdated branch,
Could you please rebase or merge the latest main into your branch and resolve the conflict? That should remove this file from the diff.
|
|
||
| [](#contributors) | ||
|  | ||
|  |
There was a problem hiding this comment.
|  | |
|  |
We have already updated to Java 25 (latest LTS)
This pull request adds the following badges to the README:
The badges are displayed at the top of the README for better visibility.
This addresses issue #7.
Summary by CodeRabbit
Documentation
Chores