Bundlewatch Github status not working?
See original GitHub issueDo you want to request a feature or report a bug?
Bug.
(Slack link above not working btw)
What is the current behavior?
Unable to get Github status check to work with Github actions.
If the current behavior is a bug, please provide the steps to reproduce.
Following the official documentation.
- Install bundlewatch.
- Create config file.
- Add
BUNDLEWATCH_GITHUB_TOKEN
secret to the project. - Add build command and bundlewatch CLI command to my existing Github Actions workflow.
- Commit these changes.
- Observe everything works and results are saved.
- Open a new pull request.
- Observe everything works again and the results are diffed against the base branch.
- Observe no status check appears on the pull request.
package.json
"size": "bundlewatch --config .bundlewatchrc.json"
.bundlewatchrc.json
{
"files": [
{
"maxSize": "20 KB",
"path": "build/static/js/*.js"
}
],
"ci": {
"trackBranches": ["main"]
}
}
.github/workflows/workflow.yml
name: workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
webapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn size
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_BRANCH_BASE: main
What is the expected behavior?
A failing or succeeding pull request check appears on Github.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, bundlewatch version, and Operating System.
Node 12.18.3 bundlewatch 0.2.7
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Issues · bundlewatch/bundlewatch - GitHub
Bundlewatch throws an exception if there is no package.json in the current directory. ... Bundlewatch Github status not working? ... ProTip! What's ...
Read more >Issues · bundlewatch/bundlewatch · GitHub
Bundlewatch throws an exception if there is no package.json in the current directory. ... Bundlewatch Github status not working? ... ProTip! Adding no:label...
Read more >bundlewatch - npm
Start using bundlewatch in your project by running `npm i bundlewatch`. There are 3 other projects in the npm registry using bundlewatch.
Read more >bundlewatch - UNPKG
66, BundleWatch can report its status on your GitHub Pull Requests. ... /><a href="https://github.com/bundlewatch/bundlewatch/issues?q=author%3Apascaliske" ...
Read more >bundlesize - Bountysource
Bundlewatch Github status not working? $ 0. Created 2 years ago in bundlewatch/bundlewatch with 7 comments. Do you want to request a feature...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Somehow it does not work with github actions and the commit that is sent to result page is a weird merge commit instead of the head commit of the pull request.
I managed to fix this by passing manually the commit sha pointing to the head commit of the pull request in my github action
checksize.yml
cc @sjwilczynski
Time for another fork? 😅