Enforce per-repo allowed merge styles (rebase + squash + fast-forward-only) #5
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Meta/Campaign
Meta/Epic
Meta/Session
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Curated
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Scope/Campaign
Status/Abandoned
Status/Blocked
Status/Conflicted
Status/In Progress
Status/In Review
Status/Need Grooming
Status/Need More Info
Status/Ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Ting/Jostoph#5
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?
Source: setting Forgejo's forge-flow config, 2026-08-10.
What's needed
The forge's flow curates a
tango/<ticket>branch into clean logical commits before the PR (Ting/Ting#4), so the merge must preserve those commits. The forge impl now sets the default in app.ini:[repository.pull-request] DEFAULT_MERGE_STYLE = rebase(lar.ad/flake-ops,modules/impls/forge/forgejo.nix)But the allowed set is per-repo, not app.ini — Forgejo defaults every repo to all styles on, so a merge-commit or rebase-merge is still one click away and can undo the curation. The intended per-repo state:
allow_rebaseallow_squash_mergeallow_fast_forward_only_mergeallow_merge_commitsallow_rebase_explicit(rebase-merge)default_merge_stylerebaseThe ask, and where it lands
This is a per-repo setting that must hold across every repo — exactly the add-and-repair conformance the
nixops-forgejoprovider already does for branch protections and labels. So the mechanism is a merge-style field on the provider's repository resource (the repo API already exposes all of the flags above), reconciled like the rest.Per the fleet norm — the implementer upstreams the capability into the common library rather than one-off-ing it — Jostoph owns pushing this into the provider (
nixops-forgejo, nowlar.ad/nixops4-providerscanonical /midgard/nixops4-providerspublic), then consuming it. Not a bespoke Jostoph reconciler for merge flags; the shared library grows the field, Jostoph drives that.Scope
nixops-forgejorepository resource with the merge-style allow flags +default_merge_style(all present on the Forgejo repo API).Context
lar.ad/flake-opsmodules/impls/forge/forgejo.nix— setsDEFAULT_MERGE_STYLE = rebase; the allowed-set is explicitly noted there as not-app.ini and deferred to the provider.