fix: prevent codecov upload from failing on forks#1752
fix: prevent codecov upload from failing on forks#1752ParasSalonia wants to merge 4 commits intohiero-ledger:mainfrom
Conversation
Signed-off-by: ParasSalonia <parassalonia22@gmail.com>
|
Hi @parvninama will this fail to run the check for PRs coming in from a fork? |
|
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. WalkthroughAdded a guard condition to the Codecov upload step in the GitHub workflow so the step only runs for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/pr-check-codecov.yml (1)
43-48: 🧹 Nitpick | 🔵 TrivialGuard condition is correct; consider adding a visible skip notice.
The
ifcondition correctly handles all three trigger scenarios:
- push to main:
pull_requestcontext is null →!nullis truthy → upload runs ✓- PR from main repo:
forkisfalse→ upload runs ✓- PR from fork:
forkistrue→ upload skipped ✓However, when the step is skipped, there's no log output indicating why. Per the coding guidelines (Priority 8), silent skips should be avoided. Consider adding an explicit step that logs when the upload is skipped:
Suggested addition before the upload step
+ - name: Skip Codecov upload (fork or external PR) + if: github.repository_owner != 'hiero-ledger' || github.event.pull_request.head.repo.fork + run: echo "::notice::Codecov upload skipped — not applicable for forks or external repositories." + - name: Upload coverage to Codecov if: github.repository_owner == 'hiero-ledger' && !github.event.pull_request.head.repo.forkAs per coding guidelines, "Avoid: Silent success or silent skips".
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Paras Salonia <parassalonia22@gmail.com>
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. Quick Fix for CHANGELOG.md ConflictsIf your conflict is only in CHANGELOG.md, you can resolve it easily using the GitHub web editor:
For all other merge conflicts, please read: Thank you for contributing! |
Signed-off-by: Paras Salonia <parassalonia22@gmail.com>
Fixes #1485