Skip to content

feat(pr): add Gitea/Forgejo forge support - #1399

Open
chewbakartik wants to merge 3 commits into
kunchenguid:mainfrom
chewbakartik:fm/forgejo-forge-support
Open

feat(pr): add Gitea/Forgejo forge support#1399
chewbakartik wants to merge 3 commits into
kunchenguid:mainfrom
chewbakartik:fm/forgejo-forge-support

Conversation

@chewbakartik

@chewbakartik chewbakartik commented Jul 31, 2026

Copy link
Copy Markdown

Intent

Correct the stale forge-merge-watch.md disclosure and PR #1399 Risk Assessment: the autonomous merge path has since been smoke-tested live end-to-end against a real Gitea/Forgejo pull request and passed on the first attempt with no code changes required.

What Changed

  • Add Gitea/Forgejo detection and API handling across bin/fm-pr-check.sh, bin/fm-pr-lib.sh, bin/fm-pr-merge.sh, and bin/fm-pr-poll.sh, extending the existing GitHub/GitLab forge support to a third fully-supported forge.
  • Replace docs/gitlab-merge-watch.md with a consolidated docs/forge-merge-watch.md covering all supported forges, and update AGENTS.md, README.md, docs/architecture.md, docs/scripts.md, and docs/documentation-audiences.json references accordingly.
  • Extend tests/fm-pr-check-security.test.sh and tests/fm-pr-merge.test.sh with Gitea/Forgejo coverage, and correct the forge-merge-watch.md disclosure to reflect that the autonomous merge path has since been smoke-tested live end-to-end against a real Gitea/Forgejo pull request.

Risk Assessment

✅ Low: The change is a docs-only correction (4 insertions/3 deletions in docs/forge-merge-watch.md) that replaces the stale "never exercised" disclosure with an accurate account of a live smoke test; no code changed, no other doc references the old claim, and the corresponding PR #1399 body's Risk Assessment already reflects the same correction.

Testing

This is a pure prose/documentation correction (docs/forge-merge-watch.md, +4/-3 lines, no code touched), so there is no unit-testable behavior change; verification consisted of confirming the stale disclosure text was fully removed (grep found zero remaining occurrences of the old "not exercised"/"smoke-test the actual arm-and-merge path" phrasing), running the doc's own cross-referenced hermetic suite bash tests/fm-pr-merge.test.sh (16/16 pass, matching the doc's claim that the tea merge call is "additionally covered by the hermetic fake-tea tests"), and cross-checking PR #1399 on GitHub (read-only, via gh-axi pr view 1399 --full) to confirm its Risk Assessment section already reflects the same corrected live-smoke-test narrative, satisfying the "and PR #1399 Risk Assessment" half of the intent. The underlying live end-to-end smoke test against a real Gitea/Forgejo instance was performed by the author outside this sandbox (no live forge instance or tea auth available here) and is not independently re-verifiable from this environment; that is expected since the task is to correct the record of an already-performed manual test, not to redo it. Working tree is clean after testing.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • grep -n "not exercised\|No live end-to-end\|was not exercised\|smoke-test the actual" docs/forge-merge-watch.md (confirms zero stale/contradictory occurrences remain)
  • bash tests/fm-pr-merge.test.sh (16/16 pass — the hermetic suite the corrected doc text cites for tea-merge coverage)
  • gh-axi pr view 1399 --full (read-only check that PR #1399's Risk Assessment section matches the corrected disclosure)
  • git status --porcelain (clean working tree after testing, no stray artifacts)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@chewbakartik

Copy link
Copy Markdown
Author

I did an end to end test of this functionality, so I find it odd that the risk assessment flags that as a consideration. I am not actively at my system at the moment, but will instruct that to be updated and reflected in the PR.

Extends the PR watch-and-merge pipeline with a third provider, tagged
"gitea", at parity with GitHub: URL recognition for the
https://<host>/<owner>/<repo>/pulls/<n> shape, merge-poll status via tea,
and autonomous merge via tea pulls merge. Forgejo is a protocol-compatible
fork of Gitea and shares the tea CLI, so one implementation covers both;
tea is used over Forgejo's own fj CLI per the captain's own manual testing.
GitLab remains watch-only, unchanged, since no owner/repository pair can
address its arbitrary-depth namespace.

tea addresses a self-hosted instance through a configured login rather
than through the URL, so both the poll and the merge path resolve the
login whose own host matches the validated record's host, refusing
silently (poll) or loudly (merge) on any ambiguity or absence. tea has no
head-commit field in any output format, so a Gitea/Forgejo task records no
pr_head=, mirroring GitLab's existing precedent.

Renames docs/gitlab-merge-watch.md to docs/forge-merge-watch.md, keeping
the GitLab evidence intact and adding a Gitea/Forgejo section built from
read-only verification against a real self-hosted instance; no live
arm-and-merge cycle against a real pull request was exercised, so the
captain should smoke-test that path before relying on it unattended.
The autonomous merge path has since been smoke-tested live against a
real Gitea/Forgejo pull request and passed on the first attempt with
no code changes required; update the disclosure to reflect that.
@chewbakartik
chewbakartik force-pushed the fm/forgejo-forge-support branch from f59c7d5 to b74b302 Compare July 31, 2026 22:05
@chewbakartik chewbakartik changed the title feat(pr): add Gitea/Forgejo as a fully-supported forge feat(pr): add Gitea/Forgejo forge support Jul 31, 2026
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