-
Couldn't load subscription status.
- Fork 15
chore(ci): skip coverage upload for external fork PRs #424
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
base: master
Are you sure you want to change the base?
Conversation
External contributors' PRs fail when uploading coverage reports because GitHub Actions doesn't expose secrets to workflows triggered by forks (security measure). This adds a conditional to skip the coverage job for external PRs while still running tests. Coverage will still run for: - Dependabot PRs (same repository) - Internal team PRs (same repository) - Pushes to master (post-merge) External contributors will see their tests pass successfully without the coverage upload step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a conditional check to prevent coverage upload failures for external fork PRs by only running the coverage job when secrets are available (same-repository PRs, Dependabot PRs, or pushes to master).
Key changes:
- Added conditional logic to skip coverage upload for external fork PRs
- Reordered job properties for consistency
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe GitHub Actions workflow adds an Changes
Sequence Diagram(s)sequenceDiagram participant GH as GitHub (event) participant WF as Workflow participant CJ as Coverage Job GH->>WF: push / pull_request event WF->>CJ: evaluate `if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)` alt condition true CJ->>CJ: run coverage job else condition false WF-->>GH: skip coverage job end Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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)
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 |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #424 +/- ## ======================================= Coverage 89.65% 89.65% ======================================= Files 3 3 Lines 116 116 ======================================= Hits 104 104 Misses 12 12
🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|



External contributors' PRs fail when uploading coverage reports because GitHub Actions doesn't expose secrets to workflows triggered by forks (security measure). This adds a conditional to skip the coverage job for external PRs while still running tests.
Coverage will still run for:
External contributors will see their tests pass successfully without the coverage upload step.
This change is
Summary by CodeRabbit