Skip to content

feat(broker): grant PUT /repos/*/pulls/*/merge — PO decision - #2224

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/broker-merge-authority
Jul 31, 2026
Merged

feat(broker): grant PUT /repos/*/pulls/*/merge — PO decision#2224
rubenvdlinde merged 1 commit into
developmentfrom
feat/broker-merge-authority

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Closes #2203.

This does not widen what the credential can do. It makes an existing capability honest.

PATCH /repos/*/git/refs/* has been granted since v1.6.0, and it can fast-forward a base branch to a PR head — which GitHub records as a merged pull request. So merge was always reachable through the broker. The catalogue simply did not say so, and #2203 was filed on exactly that gap after I found it while landing commits through the brokered path.

A rule the allow-list forbids but a one-line call achieves is worse than an explicit grant: it makes the list unreliable as a statement of what a credential can do. Someone reading it would conclude hydra cannot merge, and be wrong.

Naming the capability keeps merge authority reviewable, greppable and revocable in one place, instead of being an emergent property of the refs rule.

⚠️ The consequence is real

Whoever holds a github credential brokered through this catalogue can now merge pull requests, explicitly. That is the decision, not a side effect of it — scope the credential accordingly.

The guard test earned its keep

DoffinProviderTest failed immediately on 14 → 15, which is exactly what it exists for. Updated with the reasoning rather than just the number, so the next reader sees why the count moved.

Gates

15,539 unit tests green.

Unblocks hydra#425 task 2.3 — the applier's GO verdict can now become a merge.

Closes #2203. This does not widen what the credential can do; it makes an
existing capability honest.

PATCH /repos/*/git/refs/* has been granted since v1.6.0, and it can fast-forward
a base branch to a PR head — which GitHub records as a merged pull request. So
merge was always reachable through the broker. The catalogue simply did not say
so, and #2203 was filed on exactly that gap after I found it while landing
commits through the brokered path.

A rule the allow-list forbids but a one-line call achieves is worse than an
explicit grant, because it makes the list unreliable as a statement of what a
credential can do. Someone reading it would conclude hydra cannot merge, and be
wrong. Naming the capability keeps merge authority reviewable, greppable and
revocable in one place instead of being an emergent property of the refs rule.

⚠️ The consequence is real and should be scoped accordingly: whoever holds a
github credential brokered through this catalogue can now merge pull requests,
explicitly. That is the decision, not a side effect of it.

The guard test in DoffinProviderTest caught this immediately (14 -> 15), which
is what it is for. Updated with the reasoning rather than just the number, so
the next reader sees why the count moved.

Unblocks hydra#425 task 2.3: the applier's GO verdict can now become a merge.

Gates: 15,539 unit tests green.
@rubenvdlinde
rubenvdlinde merged commit f6557ec into development Jul 31, 2026
16 of 17 checks passed
@rubenvdlinde
rubenvdlinde deleted the feat/broker-merge-authority branch July 31, 2026 08:07
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ acdfabc

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 174/174
npm ✅ 555/555
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-07-31 08:11 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant