Skip to content

docs(blog): add community contributions post #273

docs(blog): add community contributions post

docs(blog): add community contributions post #273

Workflow file for this run

name: Blocked PR Check
on:
pull_request:
branches:
- main
types: [opened, reopened, synchronize, labeled, unlabeled]
workflow_dispatch:
inputs:
pr:
description: "PR ID"
required: true
type: string
permissions:
contents: read
pull-requests: read
jobs:
not-blocked:
name: not-blocked
runs-on: ubuntu-latest
steps:
- name: 'Verify "status: blocked" label is not applied'
if: "github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'status: blocked')"
run: |
echo "::error::This PR has the 'status: blocked' label and cannot be merged until that label is removed."
exit 1
- name: 'Verify "status: blocked" label is not applied (manual runs)'
if: "github.event_name == 'workflow_dispatch'"
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ inputs.pr }}
run: |
labels=$(gh pr view "$PR" --repo "$GITHUB_REPOSITORY" --json labels --jq '.labels[].name')
if echo "$labels" | grep -qx 'status: blocked'; then
echo "::error::PR #$PR has the 'status: blocked' label and cannot be merged until that label is removed."
exit 1
fi
echo "PR #$PR is not blocked."