Skip to content

Support all known instances in short URL format #659

Support all known instances in short URL format

Support all known instances in short URL format #659

Workflow file for this run

name: Check PR Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
check_labels:
runs-on: ubuntu-latest
steps:
- name: Check PR Labels
uses: actions/github-script@v8
with:
script: |
const allowedLabels = ['major', 'minor', 'patch', 'performance', 'internal', 'documentation', 'tests', 'dependencies'];
const labels = context.payload.pull_request.labels.map(label => label.name);
const hasValidLabel = labels.some(label => allowedLabels.includes(label));
if (!hasValidLabel) {
core.setFailed(`The pull request must have one of these labels: ${allowedLabels.join(', ')}`);
} else {
console.log('PR has a valid label.');
}