Add webasset bundle analysis to the workflows bot#379
Open
Add webasset bundle analysis to the workflows bot#379
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new workflow command to analyze web asset bundle statistics. Key changes include:
- Introducing a new "webassets" command in main.go with associated flag parsing.
- Implementing several modules in the bot/internal/webassets package to load, compare, and render bundle statistics as formatted GitHub comments.
- Updating GitHub client integrations and bot reconciliation logic to support comment creation and editing based on web asset analysis.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bot/main.go | Added new "webassets" workflow branch and flag |
| bot/internal/webassets/*.go & *_test.go | New modules for table building, stats loading, comparison, and analysis |
| bot/internal/github/github.go | Added EditComment API method |
| bot/internal/bot/*.go, webassets_test.go, bot_test.go | Updated bot logic for reconciling and updating GitHub comments |
0ba03c5 to
f448944
Compare
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.
This adds webasset bundle analysis, taking
--stats path/to/before.json,path/to/after.jsonand analysing the results into a comment that is either created or edited.The stats JSON files are generated by a Vite plugin that will live in the teleport and access-graph codebases (I can't think of an easy way to share it for now)