Skip to content

Sync integration branch with next #2349

Sync integration branch with next

Sync integration branch with next #2349

name: Compare PR stats
on: [pull_request]
permissions: read-all
concurrency:
# only allow one run of this workflow per branch, otherwise the comment could
# be overwritten by an earlier commit that runs slower than the latest commit
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
base-branch:
permissions:
pull-requests: write
uses: ./.github/workflows/record-pr-stats.yml
with:
ref: ${{ github.event.pull_request.base.sha }}
head-branch:
permissions:
pull-requests: write
uses: ./.github/workflows/record-pr-stats.yml
with:
ref: ${{ github.sha }}
compare-pr-stats:
permissions:
pull-requests: write
runs-on: ubuntu-latest
needs: [base-branch, head-branch]
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 18
cache: 'npm'
- run: npm ci
- name: Leave comment
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const leaveComment = require('./.github/leave-pr-stats-comment.js')
await leaveComment(github, context, require, ${{ toJSON(needs) }})