Skip to content

Upgrade to Corvus.JsonSchema 4 #1994

Upgrade to Corvus.JsonSchema 4

Upgrade to Corvus.JsonSchema 4 #1994

name: pull_request_labels
on:
pull_request:
types: [opened, reopened, edited, labeled, unlabeled]
jobs:
opened:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check there's at least one label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
shell: pwsh
run: |
$count = [int] (gh pr view $env:PR_NUMBER --json labels --jq '.labels | length')
if ($count -eq 0) {
throw "No labels found"
}