om-approve-merge-pr
Repo-local extension of om-approve-merge-pr - the develop → main promotion pull request merges with a merge commit, never a squash.
SKILL.md.ai/skills/om-approve-merge-pr/SKILL.md
GitHubom-approve-merge-pr (money-tracker.online)
This file extends the shared om-approve-merge-pr skill installed at
.claude/skills/om-approve-merge-pr/SKILL.md. Follow its full workflow (gate checks, approving
review, merge, optional follow-up, report) with the rule below layered on top.
The promotion merges; everything else squashes
Step 4 of the installed skill says "Squash-merge. Run tracker operation merge-pr - squash is
the default merge strategy per the descriptor." That default is right for a feature branch into
develop and wrong for exactly one pull request in this repository.
A pull request whose base is main and whose head is develop merges with a merge commit:
gh pr merge {prNumber} --merge
Never --squash, never --rebase. develop and main are two long-lived branches whose whole
relationship is shared ancestry, and the merge commit's second parent is the only thing that tells
main it already contains what develop contains; a squash writes the content onto main under a
commit with no ancestral link to what it flattened, so the next promotion re-proposes it
(ADR 0003, amendment 2026-09-09 - #148 is the promotion that did).
Read the base and the head off the pull request rather than off its title. The promotion is opened
by .github/workflows/promote-develop.yml under a fixed title, but a person can open the same pull
request by hand under any title at all.
Gate-path PRs are Rafał's merge
Owner decision 2026-11-02 (ADR 0031 addendum, signed by Rafał). Immediately before step 4
(merge), after step 2's label/QA gates and after any security verdict this run recorded, run the
gate-path procedure in .ai/skills/afk-decide/SKILL.md § 5. Do not copy the glob list. Use
tracker get-pr-files and the origin/develop copy of that skill; never gh pr view --json files, labels, or the author's risk claim.
On a gate PR (or fail-closed): apply blocked via apply_label, post the § 5 comment
(🤖 HUMAN-ONLY: merge this gate change or close it, naming the judged head and that Rafał
merges it) unless a trusted-agent comment with that first line already exists, never run
merge-pr, stop and report. If blocked and that comment are already present, do nothing more
and still do not merge. This is not a route back to om-pr-autopilot: it is a person's merge.
Remove no label a person set.
Rules
- Merging into
developispr-autopilot's job (om-pr-autopilot --allow-merge, ADR 0027); a person merges the rest. The label rules inSDLC.md(do-not-merge,blocked,qa-failed,in-progress, andneeds-qawithoutqa-approved) are a convention this skill reads and honours; no CI check enforces them (ADR 0027). - The
developtomainpromotion requires a person's release decision. An unattended run (CEZ_TASK_IDis set, or no person is in the session) merges only a PR whosebaseRefNameisdevelop; any other base, or a PR carryingdo-not-merge(the promotion carries it), is reported as merge-ready and left for the owner. Every PR is authored by the owner's one account, so the author tells nothing apart. Do not use the installed skill's GitHubAPPROVEstep on an author's own PR; GitHub does not permit it. - In that unattended run into
develop, a gate that would ask a person routes back toom-pr-autopilot's agents instead (owner decision 2026-10-06, ADR 0031), overriding the installed "never resolve a merge gate autonomously" and "the QA gate never routes to automation" rules: report the PR not mergeable now and name the route.needs-qawithoutqa-approved, a staleQA head:, andneeds-qabesideskip-qaroute toom-auto-qa-pr <number> --self-qa-signoffon the current head (treat the pair asneeds-qa);changes-requestedand aqa-failedwithisPanelQaFailedtrue route toom-auto-fix-pr <number>. Never merge past one of them in this run. Judge the panel label withnode .ai/scripts/qa-panel-failed.mjs --repo {owner}/{repo} --pr {n}(the only definition ofisPanelQaFailed). Arisk-highorsecurityPR merges with--match-head-commit <head the security verdict judged>(.ai/skills/om-pr-autopilot/SKILL.md). Aqa-failedwithisPanelQaFailedfalse, an activeqa,blockedanddo-not-mergestill stop and report. A gate PR (afk-decide§ 5) also stops: never merge it; Rafał does. - A second review is not a merge requirement (ADR 0027 removed the mandatory second reviewer). An
approving review is needed only when the base branch's ruleset asks for one; read it before step
3:
gh api "repos/{owner}/{repo}/rules/branches/<baseRefName>" --jq '[.[] | select(.type == "pull_request") | .parameters] | {approvals: (map(.required_approving_review_count) | max // 0), codeOwners: (map(.require_code_owner_review) | any)}'. Withapprovals: 0andcodeOwners: false(true fordeveloptoday), skip the approval when the run's account authored the PR, and go straight to step 4 without asking. Never report "needs an approving review from someone other than the author" as a blocker then. Only when the ruleset requires approvals or code-owner review and none exists is a missing approval a real blocker. - Base
mainand headdevelop→--merge. Every other pull request keeps the descriptor's--squash. - A promotion that will not merge cleanly is a back-merge of
mainintodevelopfirst, never a rewrite ofmain:AGENTS.mdforbids the force-push and ADR 0003 records the back-merge as the repair.