Skip to content

feat(pr): add Gitea/Forgejo as a fully-supported forge - #1399

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

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

Resolve merge conflict on already-open PR #1399 (Gitea/Forgejo forge support) after upstream main advanced; no functional changes beyond the AGENTS.md merge resolution already committed

What Changed

  • bin/fm-pr-lib.sh: parses Gitea/Forgejo pull request URLs (owner/repository on an arbitrary self-hosted host, /pulls/<n>) into a new gitea provider identity alongside the existing github and gitlab shapes, including host/owner/repo validation.
  • bin/fm-pr-check.sh and bin/fm-pr-poll.sh: recognize the gitea provider when arming and polling merge watches, requiring tea on PATH and resolving the matching tea login for the target host.
  • bin/fm-pr-merge.sh: merges Gitea/Forgejo PRs via tea (owner/repo + login derived from the URL, --style/-s merge-method handling, repo/login override rejection), in addition to the existing GitHub gh-axi path; GitLab merge request URLs still parse but remain unsupported for merging.
  • Replaces docs/gitlab-merge-watch.md with docs/forge-merge-watch.md documenting the multi-forge (GitHub/GitLab/Gitea/Forgejo) merge-watch behavior, and updates AGENTS.md, README.md, docs/architecture.md, docs/scripts.md, and docs/documentation-audiences.json accordingly.
  • Expands tests/fm-pr-check-security.test.sh and tests/fm-pr-merge.test.sh with coverage for Gitea/Forgejo URL parsing, watch arming, and merge behavior.

Risk Assessment

✅ Low: The merge commit only resolved a single textual conflict in AGENTS.md, correctly combining both branches' edits on the same line, and diffing every forge-support-owned file against the pre-merge branch tip shows zero drift; all other doubly-touched files merged cleanly on non-overlapping lines with both sides' content intact.

Testing

placeholder

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.

  • placeholder
✅ **Document** - passed

✅ No issues found.

⏭️ **Lint** - skipped
  • ⚠️ linter found issues (exit code 127)
✅ **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.

@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
@kunchenguid

kunchenguid commented Aug 3, 2026 •

Copy link
Copy Markdown
Owner

Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch.

When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again.

Noted for firstmate#1399 at b74b3026.

@chewbakartik
chewbakartik force-pushed the fm/forgejo-forge-support branch from b74b302 to 081aa28 Compare August 3, 2026 15:36
@chewbakartik

Copy link
Copy Markdown
Author

Checked the rebase request above against the current head (081aa28): git merge-tree shows zero actual conflicts - this branch's merge-base with main is already main's current tip, so there's nothing to rebase against. The PR's own mergeable field also reads true. Leaving this for anyone reviewing later: mergeable_state: unstable here reflects the required checks not having concluded yet (the standard first-time-contributor Actions approval gate), not a real conflict.

@chewbakartik
chewbakartik force-pushed the fm/forgejo-forge-support branch 2 times, most recently from ee1f6f2 to 1020dec Compare August 3, 2026 17:17
@kunchenguid kunchenguid removed the wheelhouse:pending-contributor-action Managed by Wheelhouse label Aug 3, 2026
@kunchenguid

kunchenguid commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch.

When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again.

Noted for firstmate#1399 at 1020dec3.

@chewbakartik chewbakartik changed the title feat(pr): add Gitea/Forgejo forge support feat(pr): add Gitea/Forgejo as a fully-supported forge Aug 4, 2026
@kunchenguid kunchenguid removed the wheelhouse:pending-contributor-action Managed by Wheelhouse label Aug 4, 2026
@chewbakartik
chewbakartik force-pushed the fm/forgejo-forge-support branch 2 times, most recently from 2a0b673 to 2f3cca4 Compare August 6, 2026 07:24
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.
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: closing this as stale. It has been waiting on a contributor update for 14+ days with no author push or comment. Reopen if you want to pick it back up.

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.

2 participants