Skip to content

chore(deps): update nuget non-major dependencies (patch) #5416

chore(deps): update nuget non-major dependencies (patch)

chore(deps): update nuget non-major dependencies (patch) #5416

name: "Label Check"
on:
pull_request:
types: [opened, edited, labeled, unlabeled, synchronize]
jobs:
check-label:
runs-on: ubuntu-latest
steps:
- name: Check labels
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const labels = context.payload.pull_request.labels;
const releaseLabels = ["ignore-for-release", "breaking-change", "feature", "bugfix", "dependency", "other"];
if(!releaseLabels.some(r=>labels.some(l=>l.name == r))){
core.setFailed(`The PR must have at least one of these labels: ${releaseLabels}`)
}
const backportLabels = ["backport", "backport-ignore"];
const targetBranch = context.payload.pull_request.base.ref;
if(targetBranch === "main" && !backportLabels.some(r=>labels.some(l=>l.name == r))){
core.setFailed(`The PR must have at least one of these labels: ${backportLabels}`)
}