Repository navigation
ci: add base_sha to codecov/codecov-action upload step - #1864
Conversation
Signed-off-by: oliver könig <okoenig@nvidia.com>
Greptile SummaryThis PR adds a Confidence Score: 5/5Safe to merge; the only finding is a P2 style suggestion about pinning the action ref. The change is small, well-guarded with a condition and a safe fallback expression, and does not affect test execution — only Codecov metadata. The single finding (unpinned @main) is P2 and does not block merge. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant GetPR as nv-gha-runners/get-pr-info@main
participant Codecov as codecov/codecov-action@v5
GHA->>GHA: Check if ref starts with 'refs/heads/pull-request/'
alt is a PR branch
GHA->>GetPR: Run get-pr-info step
GetPR-->>GHA: outputs.pr-info (JSON with base.sha)
GHA->>Codecov: Upload coverage with base_sha = pr-info.base.sha
else not a PR branch (step skipped)
GHA->>Codecov: Upload coverage with base_sha = '' (empty fallback)
end
Reviews (1): Last reviewed commit: "ci: add base_sha to codecov/codecov-acti..." | Re-trigger Greptile |
| - name: Get PR info | ||
| id: get-pr-info | ||
| if: startsWith(github.ref, 'refs/heads/pull-request/') | ||
| uses: nv-gha-runners/get-pr-info@main |
There was a problem hiding this comment.
Unpinned
@main reference for third-party action
nv-gha-runners/get-pr-info@main uses a mutable branch ref rather than an immutable commit SHA or version tag. All other actions in this workflow use explicit version tags (e.g. @v5, @v6, @v7). If the upstream action changes, this step will silently pick up those changes on the next run. Consider pinning to either a specific version tag or a full commit SHA for consistency and supply-chain safety.
Claude summary
Summary
Get PR infostep (nv-gha-runners/get-pr-info@main, guarded bystartsWith(github.ref, 'refs/heads/pull-request/')) to theCoveragejobbase_shatocodecov/codecov-action@v5so Codecov can correctly compute the coverage diff against the PR's base commit