ci: limit labeler to small pull requests

This commit is contained in:
Austin Horstman
2026-04-07 23:08:59 -05:00
parent c59483f8dc
commit f0c13b0ebc

View File

@@ -18,7 +18,17 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'nix-community'
steps:
- name: Get changed files count
id: count
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
COUNT=$(gh pr diff $PR_NUMBER --name-only | grep '^modules/' | wc -l)
echo "count=$COUNT" >> "$GITHUB_OUTPUT"
- uses: actions/labeler@v6
if: steps.count.outputs.count <= 10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true