feat(merge): add Forgejo pull request merge support - #14
RyzeNGrind wants to merge 1 commit into
Conversation
Adds a forgejo) case to the provider merge block in fm-pr-merge.sh, unblocking autonomous merges for nixify, obsidian-vault, dasagency.ca, and other Forgejo-hosted projects. Introduces: - forgejo_verify_mergeable(): reads live PR state via Forgejo API, sets FM_PR_MERGE_HEAD to the verified head sha, and caches credentials in FORGEJO_TOKEN/OWNER/REPO_CACHED for reuse within the merge sequence - forgejo_confirm_merged(): reads back the merged= field after the forge call to confirm landing; returns 2 (actionable/poll-armed) if unreadable - forgejo) merge case: verify → lock away record → re-check authority → POST squash merge → persist authority → confirm landed All existing authority gates (away-posture lock, captain-hold check, spawn-gen guard, control lock) apply unchanged. Credentials are read from $FM_FORGEJO_CREDS_FILE (defaults to ~/.config/das/forgejo.env).
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Warning Review limit reachedNext included review available in 12 seconds. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
forgejo)case tofm-pr-merge.sh's provider merge block, unblocking autonomous merges for nixify, obsidian-vault, dasagency.ca, and all other Forgejo-hosted projects in the fleetforgejo_verify_mergeable()— reads live PR state via Forgejo REST API, validates state/merged/mergeable/draft, caches credentials (FORGEJO_TOKEN_CACHED/OWNER/REPO)forgejo_confirm_merged()— reads backmerged=trueafter the forge call to confirm landing; returns 2 (actionable, poll stays armed) if unreadableforgejo)merge case follows the same authority gate sequence as github/gitlab: verify → lock away record → re-check authority → POST squash merge → persist authority → confirm landedMotivation
fm-pr-merge.shonly handledgithubandgitlabproviders. Theforgejoprovider hit the*)fallback with"error: invalid PR merge request"(exit 2), blocking autonomous merges under the night-order gate-enable grant. As of 2026-09-28, nixify PRs kunchenguid#40, kunchenguid#41, and kunchenguid#62 are all green + mergeable but stuck awaiting this fix.Credentials are read from
$FM_FORGEJO_CREDS_FILE(defaults to~/.config/das/forgejo.env), the same sourcefm-pr-lib.sh's existing Forgejo poll already uses.Test plan
bash -n bin/fm-pr-merge.sh— syntax clean (verified)https://git.beta.nixify.dev/ryzengrind/nixify/pulls/40(all-green, mergeable=true) after captain approvesstate/<id>.merge-authority