Adds a GitHub Actions workflow and config that labels every PR with size/xs..size/xl based on files changed and lines added, so reviewers can see at a glance how big a PR is. Lock files and generated/vendored paths are excluded, and deletions aren't counted so refactors that remove code aren't over-penalized. Co-authored-by: Orca <help@stably.ai>
30 lines
662 B
YAML
30 lines
662 B
YAML
name: PR Size Labeler
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- edited
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
contents: read
|
|
|
|
jobs:
|
|
label-pr-size:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Label PR based on size
|
|
uses: cbrgm/pr-size-labeler-action@v1.3.7
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
github_repository: ${{ github.repository }}
|
|
github_pr_number: ${{ github.event.pull_request.number }}
|
|
config_file_path: .github/pull-request-size.yml
|