name: Add PRs size label

on: pull_request_target

jobs:
  size-label:
    if: github.repository == 'frrouting/frr'
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - name: size-label
        uses: "pascalgn/size-label-action@v0.4.2"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
        with:
          sizes: >
            {
              "0": "XS",
              "20": "S",
              "50": "M",
              "200": "L",
              "800": "XL",
              "2000": "XXL"
            }
