MegaBites-AI/Windows-powershell
0372
1# Copyright (c) Microsoft Corporation.2# Licensed under the MIT License.3 4name: Verify PR Labels5 6on:7 pull_request:8 types: [opened, reopened, edited, labeled, unlabeled, synchronize]9 10permissions:11 contents: read12 pull-requests: read13 14jobs:15 verify-labels:16 if: github.repository_owner == 'PowerShell'17 runs-on: ubuntu-latest18 19 steps:20 - name: Check out the repository21 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.222 23 - name: Verify PR has label starting with 'cl-'24 id: verify-labels25 uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.026 with:27 script: |28 const labels = context.payload.pull_request.labels.map(label => label.name.toLowerCase());29 if (!labels.some(label => label.startsWith('cl-'))) {30 core.setFailed("Every PR must have at least one label starting with 'cl-'.");31 }32 