Skip to content

cyrilwanner/bundlewatch-comment-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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 license.

© Copyright Cyril Wanner

About

Post a comment to PRs with stats provided by BundleWatch.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published