Skip to content

Report bundle size in a comment on pull requests - #300

Merged
tim-smart merged 4 commits into
mainfrom
agent/effect-bot/6b9b757aff24
Nov 26, 2026
Merged

tim-smart merged 4 commits into
mainfrom
agent/effect-bot/6b9b757aff24

Conversation

@effect-bot

@effect-bot effect-bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Every pull request now gets a bundle size comment, so the numbers are visible without opening the Check run. The bot edits that one comment on each new push instead of adding another.

  • check.yml: on pull requests the Bundle size job uploads the head and base --json results as a bundle-size artifact. The job keeps its read-only token.
  • bundle-size-comment.yml: a new workflow_run workflow that runs after Check finishes on a pull request, with pull-requests: write, so fork PRs are covered too. The artifact comes from PR code, so it never checks out or runs it:
    • The PR is the single open PR to main whose head repository, branch and commit match the run. If there is no single match, it writes nothing.
    • The comment is rendered with jq from known app names and integer sizes only. Anything else fails the job; an invalid base shows n/a deltas.
    • It edits the github-actions[bot] comment that starts with <!-- bundle-size -->, and only creates one after a successful lookup finds none.

workflow_run workflows only run once they are on main, so this PR won't get a comment. I tested the same workflows in a scratch repo, with check.yml cut down to the Bundle size job: effect-bot/ui-bundle-comment-e2e#1 and effect-bot/ui-bundle-comment-e2e#2 (two branches at the same commit).

Closes EFF-4424

@tim-smart
tim-smart merged commit 16480ed into main Nov 26, 2026
13 checks passed
@tim-smart
tim-smart deleted the agent/effect-bot/6b9b757aff24 branch November 26, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants