Skip to content

User Style & Template Management #344

User Style & Template Management

User Style & Template Management #344

# ============================================================================
# ℹ️ Blog label check β€” maintainer action required, contributors can ignore.
#
# This workflow intentionally fails until a maintainer adds a
# `blog:pending`, `blog:skip`, or `blog:done` label so the team can decide
# whether to publish a blog post about the change.
#
# External contributors cannot add these labels, so if you receive a CI
# failure email from this workflow you do NOT need to do anything. A
# maintainer will add the label during review. This check is not a required
# status check and does not block merge.
# ============================================================================
name: "Require blog label (maintainer only β€” contributors can ignore failures)"
on:
pull_request:
types: [labeled, unlabeled, opened, synchronize]
permissions: {}
jobs:
check:
name: "Blog label (contributors: ignore this if it fails)"
runs-on: ubuntu-latest
# Skip for dependabot / renovate
if: >-
github.actor != 'dependabot[bot]' &&
github.actor != 'renovate[bot]'
steps:
- name: Check blog label
env:
LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}
run: |
if echo "$LABELS" | grep -qE '"blog:(pending|skip|done)"'; then
echo "βœ… Blog label found"
else
echo "::error title=Contributors can ignore β€” maintainer action required::This check fails until a maintainer adds a blog:pending / blog:skip / blog:done label. External contributors cannot add these labels and do not need to do anything; a maintainer will add the label during review."
exit 1
fi
auto-skip-bots:
name: "Blog label (auto-skip for bots)"
runs-on: ubuntu-latest
if: >-
github.actor == 'dependabot[bot]' ||
github.actor == 'renovate[bot]'
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v7
with:
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['blog:skip']
});