Skip to content

Adjusted pr label check #5

Adjusted pr label check

Adjusted pr label check #5

Workflow file for this run

name: Enforce PR Label
on:
pull_request:
types: [opened, edited, unlabeled]
push:
branches:
- '**'
jobs:
check-label:
runs-on: ubuntu-latest
steps:
- name: Check for labels
uses: actions/github-script@v6
with:
script: |
const labels = context.payload.pull_request.labels;
if (labels.length === 0) {
throw new Error('This pull request must have at least one label.');
}