fix(ci): trigger on edited so un-drafting actually lifts the draft skip
CI / shellcheck + selftests (pull_request) Successful in 1m27s

`ready_for_review` does not exist as a pull_request action on this Gitea, so
it never fired and the draft skip never lifted: a PR opened as `WIP:` carried
its skip decision to merge unless a later push happened to create a run. Draft
here is not a persisted column — it is the `WIP:` title prefix, derived by
`issue.IsWorkInProgress` — so un-drafting is a title edit, which fires a plain
`edited`.

Ported from daniel/emowheel commit 08da820 (see daniel/emowheel#71) and
daniel/gitdan (see daniel/gitdan#92), where the identical change landed first.

Accepted cost: Gitea populates no `changes` field for a title-or-body edit, so
the workflow cannot tell an un-drafting edit from an ordinary body PATCH, and
every body edit on a non-draft PR now starts a real run. That is a heavier
trade here than in the sibling repos -- this job installs two Rust toolchains
and drives a real Cargo, at `timeout-minutes: 20` -- but the `concurrency:`
block groups `pull_request` runs on `github.ref` with `cancel-in-progress:
true`, so a burst of edits collapses to one run. Still-draft PRs are unchanged.

Docs: the workflow comment is rewritten and shortened, and README's Development
section retires the empty-commit workaround it prescribed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LjbhSqQf3pwnPA6MVaWcWL
This commit is contained in:
2026-09-02 12:34:24 -05:00
co-authored by Claude Opus 5
parent 14bea98626
commit b791896e03
2 changed files with 45 additions and 14 deletions
+9 -10
View File
@@ -5,17 +5,16 @@ on:
branches: [main]
pull_request:
branches: [main]
# Spelled out only to keep `ready_for_review` in the list — naming any type
# replaces the whole default set, so the other three have to be restated.
# It is inert on this instance (draft state here is the `WIP:` title
# prefix, so un-drafting is a title edit and raises no
# `ready_for_review` action) and costs nothing.
# Spelled out only to keep `edited` in the list — naming any type replaces
# the whole default set, so the other three have to be restated.
#
# The consequence, which is the part that bites: the `if:` guard below is
# evaluated when a run is CREATED, and un-drafting creates no run. A PR
# opened as a draft keeps its skip decision until something else produces
# one. Push an empty commit after un-WIP'ing.
types: [opened, synchronize, reopened, ready_for_review]
# `edited`, not `ready_for_review`: draft here is the `WIP:` title prefix,
# so un-drafting is a title edit and no ready-for-review action is ever
# raised. That edit is what creates the run which lifts the `if:` skip
# below (decided once, when a run is CREATED). Do not swap it back and do
# not drop this to the bare default — either restores the bug. The accepted
# cost and the evidence are in README's Development section.
types: [opened, synchronize, reopened, edited]
# gitdan-ci runs four repos' CI on two capacity slots, and the compiler-backed
# suites below are multi-minute. A superseded run costs a slot in front of