Pull-request target builds: trigger.onPullRequestTarget (v1.36.0) #117

Merged
mi merged 11 commits from mihoe/pull-request-target into main 2026-10-05 05:33:09 +02:00
Owner

Pull-request target builds: trigger.onPullRequestTarget runs every open, non-draft pull request once per head commit, on a fresh checkout of its base.
The definition is host-only: a branch can neither add, change nor switch off such a build, so the pull request under review cannot fake the status or reach the secrets.
The status goes to the head SHA; the build gets WERKATOR_PR_* and WERKATOR_GITEA_*.
export:forgejo maps it to pull_request_target.

Motivation: an AI review gate (werkrevisor, PR-Agent based) as a merge condition.
Details: the PR-doc under docs/prs/ (still with the placeholder PR#33, renamed in a follow-up commit).

🤖 Generated with Claude Code

Pull-request target builds: `trigger.onPullRequestTarget` runs every open, non-draft pull request once per head commit, on a fresh checkout of its base. The definition is host-only: a branch can neither add, change nor switch off such a build, so the pull request under review cannot fake the status or reach the secrets. The status goes to the head SHA; the build gets `WERKATOR_PR_*` and `WERKATOR_GITEA_*`. `export:forgejo` maps it to `pull_request_target`. Motivation: an AI review gate (werkrevisor, PR-Agent based) as a merge condition. Details: the PR-doc under `docs/prs/` (still with the placeholder PR#33, renamed in a follow-up commit). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 10 commits 2026-10-04 22:10:29 +02:00
The branch layer loses every pull-request target definition before the merge,
and the host's definitions are put back as the primary configuration resolves them,
so not even an inherited builds.default setting comes from the branch.
Combinations with other triggers, requirePullRequest, builds.default and follow-ups are refused at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The settings come from the primary configuration alone, and a definition run without
its pull request (or pull-request data on any other definition) is refused.
The result records the pull request, so a re-run builds the same head on the same base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decision lives in PullRequestTargets, fed by this cycle's read of the forge and the primary definitions only.
Without a forge connection the watcher says once that the builds never run.
Startup recovery, UI restart and retry re-run a pull-request target build with its recorded pull request,
and such a build triggers no follow-ups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release notes of v1.35.0 get their missing closing </ul>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi force-pushed mihoe/pull-request-target from 250ddd0ca8 to cb93e4cace 2026-10-04 22:10:29 +02:00 Compare
mi marked the pull request as ready for review 2026-10-05 05:10:25 +02:00
mi added 1 commit 2026-10-05 05:13:50 +02:00
# Conflicts:
#	build.gradle.kts
#	src/main/resources/templates/releases.html
mi merged commit 39df99e81d into main 2026-10-05 05:33:09 +02:00
mi deleted branch mihoe/pull-request-target 2026-10-05 05:33:09 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#117