Skip to content

ci(bundle): skip the Codecov upload on PRs from forks - #356

Merged
klodr merged 1 commit into
mainfrom
ci/bundle-upload-skip-forks
Oct 26, 2026
Merged

klodr merged 1 commit into
mainfrom
ci/bundle-upload-skip-forks

Conversation

@klodr

@klodr klodr commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • GitHub does not hand an OIDC token to pull_request runs whose head repo differs from the base, so the tokenless Codecov upload in Bundle Analysis can only fail on a fork PR ("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL"). Bundle Analysis is a required check, so every outside contribution is blocked — seen on fix(search): state zero matches instead of returning an empty text #346.
  • The upload step now runs on pushes, tags, merge groups and same-repo PRs only, the same rule leak-detect already applies. The build still runs for fork PRs, and the bundle size is recorded once the PR is merged.

Type

  • feat — new user-facing feature or tool
  • fix — bug fix
  • docs — documentation only
  • refactor — no behavior change
  • perf — performance
  • test — test-only change
  • ci — CI / workflows / release plumbing
  • chore — deps, build, or other repo-management
  • security — security-sensitive change (see Security checklist below)

Checklist

  • npm test green locally (vitest)
  • npm run build succeeds (includes tsc --noEmit)
  • npm run lint clean — workflow YAML checked with yaml-lint
  • npm run format:check clean
  • CHANGELOG.md updated under [Unreleased] (if user-visible)
  • Conventional-commit PR title ≤72 chars

Notes for reviewers

No pull_request_target, no new permission, no secret exposed to forks: the step is only skipped.

GitHub does not hand an OIDC token to pull_request runs whose head
repo differs from the base, so the tokenless upload can only fail
there, and Bundle Analysis is a required check: every outside
contribution was blocked (seen on #346). The upload step now runs on
pushes, tags, merge groups and same-repo PRs only, like leak-detect;
the build still runs for fork PRs.

Signed-off-by: Claude Perrin <klodr@users.noreply.github.com>
@klodr
klodr enabled auto-merge (squash) October 26, 2026 07:22
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T07:22:15.804021Z
We couldn’t complete this review. Comment @codex review to try again.
9bca5fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ee12b5f and 9bca5fe.

Files selected for processing: 1
  • .github/workflows/bundle-analysis.yml

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

📝 Summary
  • Skip the Codecov bundle upload for pull requests from forks, which do not receive the OIDC token required by the upload.
  • Continue to build fork pull requests. Run the upload for pushes, tags, merge groups, and same-repository pull requests.

The bundle-analysis workflow now skips Codecov bundle uploads for fork pull requests. It continues uploads for non-pull-request events and pull requests from the current repository.

Changes: Bundle upload workflow

Layer / File(s) Summary
Conditional Codecov upload
.github/workflows/bundle-analysis.yml
The Codecov upload step runs only for non-pull-request events or pull requests whose head repository matches github.repository.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: Minimal · up to 9bca5

No actionable merge-blocking risk remains in the reviewed workflow change.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title uses the allowed ci type with the optional bundle scope. The subject is lowercase, imperative, relevant to the workflow change, has no trailing period, and is 53 characters long.
Description check Passed The description directly explains the Codecov upload condition, the fork pull request failure, the workflow behavior, and the validation performed. It is related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.39%. Comparing base (ee12b5f) to head (9bca5fe).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #356   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files          35       35           
  Lines        2320     2320           
  Branches      691      691           
=======================================
  Hits         2306     2306           
  Misses         12       12           
  Partials        2        2           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee12b5f...9bca5fe. Read the comment docs.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@klodr
klodr merged commit feb557d into main Oct 26, 2026
26 checks passed
@klodr
klodr deleted the ci/bundle-upload-skip-forks branch October 26, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant