Skip to content

fix: markedWhenCompleted indicator now displays correctly when using all navigation components #4408

fix: markedWhenCompleted indicator now displays correctly when using all navigation components

fix: markedWhenCompleted indicator now displays correctly when using all navigation components #4408

name: 'Label Check'
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
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 = ['kind/breaking-change', 'kind/product-feature', 'kind/bug', 'kind/other', 'kind/dependencies', 'ignore-for-release'];
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}`)
}