forked from heavy-duty/ceremony
57 lines
3 KiB
YAML
57 lines
3 KiB
YAML
name: labels-sweep
|
|
# Ceremony's own sweep caller (#209) — self-labels.yml's detached half,
|
|
# wearing the same local-`uses:` deviation and the same warning: consumers
|
|
# must NEVER copy the local form (it rides main, unpinned — correct only
|
|
# for the repo that IS the source). Consumers write:
|
|
# uses: heavy-duty/ceremony/.github/workflows/labels-sweep.yml@<pinned-tag>
|
|
on:
|
|
# The consumer owns this cadence (#203). Hourly is the recommended default
|
|
# when no other engine drives board state: the cron is then the sweep's ONLY
|
|
# wake for a review verdict landing (there is no
|
|
# pull_request_review trigger on the labels caller), blocker:ci-red set or
|
|
# cleared (no check_suite/check_run/workflow_run), a blocker:conflict when
|
|
# ANOTHER PR merges under this one, and the time-based stale / 48h
|
|
# claim-reclaim, plus every fork-headed PR transition on this Forgejo because
|
|
# its pull_request_target token is read-only (#241). Issue events and
|
|
# same-repository PR events carry the rest in seconds, one trigger-job
|
|
# dispatch away. Hourly trades ≤1h of latency on the scheduled classes
|
|
# while cutting nominal scheduled sweeps from four an hour to one at
|
|
# GitHub's 1-minute billing floor. Do not delete the cron: it is their
|
|
# discovery path. If another engine writes some of those transitions, only
|
|
# the classes with no other writer bound the cadence; relax it only as that
|
|
# list shrinks.
|
|
schedule: [{cron: "0 * * * *"}]
|
|
# A manual full-board sweep. A bare dispatch (input default "yes") also
|
|
# bootstraps the taxonomy on a fresh repo — what dispatching the labels
|
|
# caller did before #209. The reusable's trigger job wakes this workflow
|
|
# with bootstrap=no on every issue and same-repository PR event — an
|
|
# event-woken sweep must not re-upsert ~20 labels each time — so declaring
|
|
# this input is part of the
|
|
# caller contract: a dispatch naming an undeclared input is refused, and
|
|
# the trigger job goes loudly red.
|
|
workflow_dispatch:
|
|
inputs:
|
|
bootstrap:
|
|
description: Bootstrap the label taxonomy before sweeping
|
|
type: choice
|
|
options: ["yes", "no"]
|
|
default: "yes"
|
|
permissions:
|
|
contents: read
|
|
checks: read # mergeability/check-rollup read for PR state
|
|
statuses: read # commit-status rollup read for PR state
|
|
issues: write
|
|
pull-requests: write
|
|
jobs:
|
|
sweep:
|
|
# pr_workflow_name keeps its default: ceremony's PR-facing caller is
|
|
# named `labels` (self-labels.yml).
|
|
uses: ./.github/workflows/labels-sweep.yml
|
|
with:
|
|
# The dispatch input crosses the workflow_call boundary HERE, or not
|
|
# at all: on this instance the called workflow did not see this
|
|
# caller's event inputs implicitly (ceremony#215), so declare-and-pass
|
|
# is the only channel used. On `schedule` the top-level context is
|
|
# empty, and empty maps to "no" EXPLICITLY — a cron that bootstraps is
|
|
# the failure kimi named before it could exist.
|
|
bootstrap: ${{ inputs.bootstrap || 'no' }}
|