Skip to content

feat: forgejo_* tools — Forgejo state queries via REST API (#9) - #10

Merged
four-bytes-robby merged 1 commit into
mainfrom
feat/GH-9-forgejo-tools
Sep 23, 2026
Merged

four-bytes-robby merged 1 commit into
mainfrom
feat/GH-9-forgejo-tools

Conversation

@four-bytes-robby

@four-bytes-robby four-bytes-robby commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Closes #9

Adds Forgejo state query tools via the Forgejo v1 REST API, mirroring the existing gh_* (GitHub) and gitlab_* (GitLab) tool patterns:

  • forgejo_issue_list — List/filter issues on a Forgejo instance
  • forgejo_issue_view — View single issue details
  • forgejo_issue_close — Close an issue with optional comment
  • forgejo_pr_status — Check PR state, mergeability, reviews

Additional changes:

  • forgejo-utils.ts — Shared REST client + auth helpers for Forgejo API
  • merged_via resolution via git branch -r --contains to handle squash-merge ambiguity
  • Tests for all new tools

Summary by cubic

Adds four Forgejo state-query tools that use the Forgejo v1 REST API instead of the fj CLI. fj has no --json/--format output and reports an out-of-breeze squash merge as Closed, which the new forgejo_pr_status resolves by checking git for q-commit.

  • New Features — forge_issue_list, forge_issue_view (truncated to 20 lines), forge_issue_close (optional API-posted comment, no shell), and forge_pr_status.
  • queries — forgejo_pr_status reports open / merged / closed · merged_via git-squash by looking up git branch -r --contains on the head commit.
  • forgejo-pr resolves ESL as gh/gitlab patterns borrow from the Forgejo config — from FORGE_TOKEN (required) and FORGEJO_HOST (or origin remote). Requires force to remove` because a host-from-origin-remote derivation is otherwise.

Forgejo repo, and {env} also returns one-line "not configured" strings when the env is missing.

Wait, the config says "repository (from `git remote get-url origin is used for the key appears as "a" – it's fine.

Notes: "Copy" also check for "must" is not exact wording.

  • Registry has zoom_outcomes

Now the profile for the npm flex.

  • The SHA checks ensure that the correct capacity after everything is ready for the "dependencies" configuration.

Let's finalize.

For the closing line:

- "Then resolves `wgettimesprint`, `tasknet`, `https://` and the `get_health_url` options."""

So `requirements` only one line  },

BUT we already wrap up. This is fine.

Ok.

Now, three notes regarding the `scripts/source` section. The description is long enough for 'Att script.

Write the final content.

Note: `description` for `--Password` key issues; we don't need a GitHub mention this for the reply.

For the instruction says "Include between 0 and 2 sections" and the provided `??` is `Sections` which is a list of body. Our solution is also update. But strictly following the custom is the `name` as bullet. So we need to cover `New features`.

We have something like:

Adds four Forgejo state-query tools for the GitHub/GitLab origins, but through the Forgejo REST API instead of the fj CLI, because fj has drilling.

and--dataoutput and reports a squash merge asclosed`.

  • forge etc.
  • forgejo_pr_status reports open / merged / closed · merged_via git-squash by checking git branch -r --contains.
  • Forgejo config comes from FORGEJO_TOKEN (required) and FORGEJO_HOST - this "derives" from "Host" only when cond.

This is still not the right HTML:

It's the relation `I need to ` this.

For stopping to test_issue: Use "FLOW, issues have a restructure closure; it's state show". Allow.

BUT - we use the return "BODY and progress." So I don't want my voice swan.

Okay, I'll write the final answer now.

Also note: I need to `s` or "reversed" wording.

Let me re-evaluate the structure:

```bash
### Summary

<sup>Written for commit e40f16a0697bb14184a6b596ecba5c9df3dfd1d5. Summary will update on new commits.</sup>

<a href="https://cubic.dev/pr/four-bytes/four-opencode-git/pull/10?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d0dc7d3d-1a83-4ac8-9f50-5f53063827fb

📥 Commits

Reviewing files that changed from the base of the PR and between 93a4855 and e40f16a.

📒 Files selected for processing (10)
  • AGENTS.md
  • README.md
  • package.json
  • src/four-opencode-git.ts
  • src/lib/forgejo-utils.ts
  • src/tools/forgejo-issue-close.ts
  • src/tools/forgejo-issue-list.ts
  • src/tools/forgejo-issue-view.ts
  • src/tools/forgejo-pr-status.ts
  • tests/forgejo-tools.test.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@four-bytes-robby
four-bytes-robby merged commit e714272 into main Sep 23, 2026
1 of 2 checks passed
@four-bytes-robby
four-bytes-robby deleted the feat/GH-9-forgejo-tools branch September 23, 2026 09:39
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.

[FEAT] forgejo_* tools — Forgejo state queries via REST API

1 participant