Apply requirements
Apply requirements are conditions a PR must meet before imulup apply runs for a project. They don’t affect plans.
| Requirement | Met when |
|---|---|
approved |
At least one reviewer other than the PR author has approved, and that approval is their latest review |
mergeable |
GitHub reports that the PR has no merge conflicts |
Per project
Section titled “Per project”version: 1projects: - name: network-prod dir: network stack: prod apply_requirements: [approved, mergeable] - name: network-dev dir: network stack: dev # no requirementsFor every project
Section titled “For every project”Server flags add requirements to every project in every repository, on top of any in imulup.yaml:
IMULUP_REQUIRE_APPROVAL=trueIMULUP_REQUIRE_MERGEABLE=trueA repository can’t turn off a requirement the server sets.
When a requirement isn’t met
Section titled “When a requirement isn’t met”imulup skips the project with a message, and still applies the others:
⏸️ network-prod — skippedapply requirement `approved` is not metOnce the requirement is met, comment imulup apply again. The plan stays valid as long as nobody pushes.
Details and limits
Section titled “Details and limits”approved
- imulup reads the PR’s reviews and keeps each reviewer’s latest review that isn’t a plain comment. The requirement is met if any of those is an approval, so a later Request changes from the same reviewer cancels their approval.
- Reviews from the PR author don’t count.
- imulup doesn’t check whether the approver has write access, or whether they’re a code owner. Enforce that with
branch protection, and require
imulup/applyto pass before merging (see below). - Approvals that GitHub dismissed, for example with Dismiss stale pull request approvals when new commits are pushed, don’t count.
mergeable
- This is GitHub’s
mergeableflag: no conflicts with the base branch. It doesn’t evaluate branch protection rules or required checks. - GitHub computes the flag in the background. Right after a push it can still be unknown, which counts as not met. Retry after a few seconds.
Using branch protection with imulup
Section titled “Using branch protection with imulup”Apply requirements gate the apply, and branch protection gates the merge. Together they give the Atlantis-style “apply before merge” flow:
- Require reviews (and code owners, if you use them) in branch protection.
- Require the
imulup/applystatus check, so a PR can’t merge until its projects are applied or unchanged. - Set
apply_requirements: [approved, mergeable]on sensitive projects, so nobody can apply without review.