opencode-forgejo (0.1.0)

Published 2026-05-20 21:01:52 -07:00 by release-plz-bot

Installation

registry=
npm install opencode-forgejo@0.1.0
"opencode-forgejo": "0.1.0"

About this package

opencode-forgejo

Forgejo workflow tools for opencode agents.

This plugin wraps the Forgejo REST operations agents repeatedly need while working on PRs. It intentionally provides high-level tools for the workflows that are easy to get wrong: inline review thread replies, PR readiness checks, stale release PR cleanup, branch deletion, and merge operations.

Usage

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "opencode-forgejo",
      {
        "baseUrl": "https://git.johnwilger.com",
        "tokenEnv": "FORGEJO_TOKEN",
        "owner": "Slipstream",
        "repo": "opencode-plugins"
      }
    ]
  ]
}

The token is read from the configured environment variable at tool execution time. Do not put tokens in opencode.json.

Tools

  • forgejo_pr_overview: fetches PR details, top-level comments, reviews, inline review comments, and workflow runs for the PR head commit.
  • forgejo_list_prs: lists repository pull requests.
  • forgejo_create_pr: creates a pull request.
  • forgejo_update_pr_metadata: updates pull request title, body, or base branch.
  • forgejo_reply_inline_review: replies on an existing inline review thread using the correct Forgejo endpoint and original path/position.
  • forgejo_comment_pr: posts a top-level PR comment for non-inline summaries.
  • forgejo_supersede_pr: comments on and closes a stale PR, optionally deleting its head branch.
  • forgejo_merge_pr: merges a PR with Forgejo merge options.
  • forgejo_delete_branch: deletes a repository branch.
  • forgejo_workflow_runs: lists workflow runs, optionally filtered by head SHA/status/event.
  • forgejo_api_request: authenticated REST escape hatch for Forgejo endpoints not yet promoted to a high-level tool.

Inline Review Feedback

For inline review feedback, agents must use forgejo_reply_inline_review, not forgejo_comment_pr. Forgejo threads replies by review id, file path, and diff position. This plugin posts to:

POST /api/v1/repos/{owner}/{repo}/pulls/{pr}/reviews/{reviewID}/comments

with:

{
  "body": "@reviewer ...",
  "path": "original/comment/path",
  "new_position": 7,
  "old_position": 0
}

Forgejo 15 does not expose a token-authenticated API for resolving inline review conversations. Resolution remains a manual browser action unless a future Forgejo release adds a working REST endpoint.

Dependencies

Dependencies

ID Version
zod latest

Peer dependencies

ID Version
@opencode-ai/plugin 1.15.6
Details
npm
2026-05-20 21:01:52 -07:00
8
MIT
latest
7.3 KiB
Assets (1)
Versions (1) View all
0.1.0 2026-05-20