# Stop a branch check when a pull request is opened while it runs #679
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung#679
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
check-branchasks once, in its first step (skip,ci/skip-check.exs open-pr), whether the branch has an open pull request. When the pull request is opened a minute after the push, which is the usual order, the branch check has already passed that step and runs in full beside thecheck-prbuild of the same commit.Seen on 2026-11-13: push to
issue/mitgliederverwaltung-541at 11:20 (build 3048), pull request #677 opened at 11:21 (build 3049). Both ran the complete check at the same time on the one runner (4 CPUs, 3.8 GiB RAM) and both took clearly longer than a single run. Only the pull request build counts: its status is the one branch protection requires.Options that do not help:
refs/heads/…) and a pull request build (refs/pull/…) are different refs (to be confirmed, not relied on).Proposal
Ask the same question again right before the expensive part: the
teststep ofcheck-branchfirst runselixir ci/skip-check.exs open-pr …and ends the build early (exit 78) when a pull request is open by then. The test step starts afterdeps, roughly 2–3 minutes after the push, so a pull request opened within that window costs only the duplicated deps/lint/typecheck work, not a second test suite.check-prandcheck-mainstay as they are. The script, its API read and its token-free access are unchanged, so the trust boundary does not move.To check while building
lint,typecheck) whentestexits 78: are they stopped, or do they finish? If they finish, decide whether the second check also belongs in front oftypecheck(Dialyzer is the second-largest step).rebuild-cachedepends ontest; confirm it is skipped, so an early end never writes a half-built cache.test/ci/drone_render_test.exspins theteststep command ofcheck-branch(second skip check present,check-prandcheck-mainwithout it).Acceptance criteria
check-pr), not twice; the branch build ends green with the "open pull request" message.