ci: set explicit Codecov slug for org-wide token - #185
Merged
Merged
Conversation
CODECOV_TOKEN was changed to an org-wide upload token, which (unlike a per-repo token) does not identify the target project. Pass slug: open-reaction-database/ord-interface explicitly so coverage is attributed to ord-interface regardless of git-context detection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
+ Coverage 81.93% 82.88% +0.94%
==========================================
Files 16 16
Lines 1002 1075 +73
==========================================
+ Hits 821 891 +70
- Misses 181 184 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CODECOV_TOKENwas changed to an org-wide upload token. Unlike a per-repo upload token, an org token does not identify the target Codecov project, so uploads depend on git-context slug detection. Set the slug explicitly to attribute coverage to this repo deterministically.- uses: codecov/codecov-action@v5 with: files: coverage.xml + # CODECOV_TOKEN is an org-wide token, so the repo slug must be explicit. + slug: open-reaction-database/ord-interface fail_ci_if_error: ${{ ... }} token: ${{ secrets.CODECOV_TOKEN }}Part of a 3-repo set (ord-app, ord-schema, ord-interface) aligning Codecov uploads to the org-wide token.
🤖 Generated with Claude Code
Greptile Summary
Adds an explicit
slug: open-reaction-database/ord-interfaceto the Codecov upload step intests.ymlto ensure coverage is attributed to the correct repository when using an org-wideCODECOV_TOKEN. The comment inline explains that org-wide tokens rely on git-context slug detection, which is not always reliable.slugfield to thecodecov/codecov-action@v5step so uploads are deterministically routed to this repo's Codecov project rather than relying on auto-detection.ord-app,ord-schema,ord-interface) aligning on the org-wide token strategy.Confidence Score: 5/5
Safe to merge — the one-line addition correctly identifies the repository and has no effect on test execution or secrets handling.
The change adds a single, correctly valued slug field to the Codecov upload step. The slug matches the actual repository path, the token reference is unchanged, and no test or build logic is modified.
No files require special attention.
Important Files Changed
slug: open-reaction-database/ord-interfaceto the Codecov upload step; the value matches the actual repository name. No other logic is touched.Sequence Diagram
sequenceDiagram participant GHA as GitHub Actions participant CC as Codecov Action v5 participant CCS as Codecov Service GHA->>CC: Upload coverage.xml Note over CC: slug: open-reaction-database/ord-interface Note over CC: token: CODECOV_TOKEN (org-wide) CC->>CCS: "POST /upload?slug=open-reaction-database/ord-interface" CCS-->>CC: Coverage attributed to correct repo CC-->>GHA: Upload successReviews (1): Last reviewed commit: "ci: set explicit Codecov slug for org-wi..." | Re-trigger Greptile