Skip to content

[Compute] az sig image-version create/update: Add new parameter --block-deletion-before-end-of-life to support blocking deletion if the end of life has not expired #2269

[Compute] az sig image-version create/update: Add new parameter --block-deletion-before-end-of-life to support blocking deletion if the end of life has not expired

[Compute] az sig image-version create/update: Add new parameter --block-deletion-before-end-of-life to support blocking deletion if the end of life has not expired #2269

Workflow file for this run

name: Block PR merging on blocled labels
on:
pull_request_target:
types: [labeled, unlabeled]
branches:
- dev
- release
jobs:
block-merge:
runs-on: ubuntu-latest
steps:
- name: Check blocked labels
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
const blockedLabels = ["do-not-merge", "needs-author-feedback"];
if (labels.some(label => blockedLabels.includes(label))) {
console.log(`It is not allowed to merge a PR with any blocked labels: ${blockedLabels}`);
process.exit(1); // Exit with a non-zero status code to block merge
} else {
console.log("It is allowed to merge the PR.");
}