mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
ci: limit labeler to small pull requests
This commit is contained in:
10
.github/workflows/labeler.yml
vendored
10
.github/workflows/labeler.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user