https://github.com/cyrilwanner/bundlewatch-comment-action
Post a comment to PRs with stats provided by BundleWatch.
https://github.com/cyrilwanner/bundlewatch-comment-action
bundlewatch github-action
Last synced: 5 months ago
JSON representation
Post a comment to PRs with stats provided by BundleWatch.
- Host: GitHub
- URL: https://github.com/cyrilwanner/bundlewatch-comment-action
- Owner: cyrilwanner
- License: mit
- Created: 2020-07-23T16:43:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T19:30:38.000Z (almost 4 years ago)
- Last Synced: 2024-10-06T14:42:22.063Z (over 1 year ago)
- Topics: bundlewatch, github-action
- Language: JavaScript
- Homepage:
- Size: 1.21 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bundlewatch-comment-action
Post a comment to PRs with stats provided by BundleWatch using GitHub Actions.
## Installation
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:
```yml
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`.
## Inputs
* `github-token`: You can use the token automatically provided by GitHub Actions using `${{ secrets.GITHUB_TOKEN }}`. You don't need to do anything else.
If you want the comment to be posted from a specific user, you can use the token of this user here instead.
* `bundlewatch-github-token`: The BundleWatch token provided by https://service.bundlewatch.io/setup-github.
## License
Licensed under the [MIT](https://github.com/cyrilwanner/bundlewatch-comment-action/blob/master/LICENSE) license.
© Copyright Cyril Wanner