Skip to content

[WIP] Test PR stats with Babel private fields #75

[WIP] Test PR stats with Babel private fields

[WIP] Test PR stats with Babel private fields #75

Workflow file for this run

name: Stats comment
on:
pull_request:
workflow_dispatch:
permissions:
pull-requests: write
jobs:
generate-stats:
name: Generate stats
runs-on: ubuntu-latest
# Skip when token write permissions are unavailable on forks
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Restore dependencies
uses: ./.github/workflows/actions/install-node
- name: Build
uses: ./.github/workflows/actions/build
- name: Add comment to PR
uses: actions/[email protected]
env:
WORKSPACE_DIR: ${{ github.workspace }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { commentStats } = await import('${{ github.workspace }}/.github/workflows/scripts/comments.mjs')
// PR information
const issueNumber = ${{ github.event.pull_request.number }}
const commit = '${{ github.event.pull_request.head.sha }}'
const options = {
titleText: ':clipboard: Stats',
markerText: 'stats'
}
await commentStats({ github, context, commit }, issueNumber, options)