Repository navigation
Report bundle size in a comment on pull requests - #300
Merged
Merged
Conversation
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.
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--jsonresults as abundle-sizeartifact. The job keeps its read-only token.bundle-size-comment.yml: a newworkflow_runworkflow that runs after Check finishes on a pull request, withpull-requests: write, so fork PRs are covered too. The artifact comes from PR code, so it never checks out or runs it:mainwhose head repository, branch and commit match the run. If there is no single match, it writes nothing.jqfrom known app names and integer sizes only. Anything else fails the job; an invalid base showsn/adeltas.github-actions[bot]comment that starts with<!-- bundle-size -->, and only creates one after a successful lookup finds none.workflow_runworkflows only run once they are onmain, so this PR won't get a comment. I tested the same workflows in a scratch repo, withcheck.ymlcut 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