Skip to content

chore(ci): Add labels to PRs based on LoC / num files changed #42177

chore(ci): Add labels to PRs based on LoC / num files changed

chore(ci): Add labels to PRs based on LoC / num files changed #42177

Workflow file for this run

name: Pull request labeler
on:
pull_request:
types: [opened, synchronize]
branches:
- "main"
jobs:
# Docs: https://github.com/actions/labeler
label-by-path:
# do not run on forks
if: github.repository == 'mdn/content'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Docs: https://github.com/cbrgm/pr-size-labeler-action
label-by-size:
# do not run on forks
if: github.repository == 'mdn/content'
needs: label-by-path
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Label PR based on size
uses: cbrgm/pr-size-labeler-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }} # Repository name
github_pr_number: ${{ github.event.number }} # Pull request number
config_file_path: ".github/pull-request-size.yml" # Path to pr-size-labeler config