Post a comment to PRs with stats provided by BundleWatch.
MIT License
Post a comment to PRs with stats provided by BundleWatch using GitHub Actions.
Visit https://service.bundlewatch.io/setup-github and store the BUNDLEWATCH_GITHUB_TOKEN
in a secret in your repository.
Add the action to your workflow:
on:
push:
branches: [ master ] # run on master to save stats for your main branch
pull_request:
types: [ opened, synchronize ] # run on every pull request change to post a comment
name: Generate Pull Request Stats
jobs:
stats:
name: PR Stats
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: cyrilwanner/bundlewatch-comment-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
The action looks for the BundleWatch configuration in .github/bundlewatch.json
.
github-token
: You can use the token automatically provided by GitHub Actions using ${{ secrets.GITHUB_TOKEN }}
. You don't need to do anything else.bundlewatch-github-token
: The BundleWatch token provided by https://service.bundlewatch.io/setup-github.Licensed under the MIT license.
© Copyright Cyril Wanner