name: PR Size Labeling on: pull_request_target: types: - opened - closed - ready_for_review - review_requested defaults: run: shell: bash permissions: {} jobs: label-pr-size: if: (github.event.pull_request.draft == false || github.event.pull_request.user.login == 'Copilot' && github.event.pull_request.user.type == 'Bot') runs-on: ubuntu-slim permissions: pull-requests: write issues: write timeout-minutes: 5 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false sparse-checkout: .github/workflows/pr-size.js sparse-checkout-cone-mode: false - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: retries: 3 script: | const script = require('./.github/workflows/pr-size.js'); await script({ github, context });