Add support for Actions #60

Closed
opened 2026-02-03 23:15:42 +00:00 by redbeard · 2 comments
redbeard commented 2026-02-03 23:15:42 +00:00 (Migrated from codeberg.org)

FYI, in the upstream forgejo-sdk issue about organization and repository variables I mentioned that I have been using the following patch (codeberg.org/redbeard/forgejo-sdk@27ab18120f) to the SDK which added support for a bunch of missing swagger endpoints.

Additionally, I'm then using that patch along with this patch (codeberg.org/redbeard/forgejo-mcp@5dc4571230) to provide support for Actions to forgejo-mcp. Thusfar it's working well.

Think of this as a heads up to potentially useful community patches.

FYI, in the upstream forgejo-sdk issue about [organization and repository variables](https://codeberg.org/mvdkleijn/forgejo-sdk/issues/84#issuecomment-10313028) I mentioned that I have been using the following patch (https://codeberg.org/redbeard/forgejo-sdk/commit/27ab18120f04fd9460898dd88a35670bcde1765e) to the SDK which added support for a bunch of missing swagger endpoints. Additionally, I'm then using that patch along with this patch (https://codeberg.org/redbeard/forgejo-mcp/commit/5dc4571230806e911e8d6b5b764f596d98f76098) to provide support for Actions to forgejo-mcp. Thusfar it's working well. Think of this as a heads up to potentially useful community patches.
goern commented 2026-02-06 08:56:31 +00:00 (Migrated from codeberg.org)

@redbeard I have created codeberg.org/goern/forgejo-mcp@9fa8f1151b

would you like to open a PR to get codeberg.org/redbeard/forgejo-mcp@5dc4571230 inhere?

@redbeard I have created https://codeberg.org/goern/forgejo-mcp/commit/9fa8f1151bd1843bbf4bc7db25d8d3cc70a8c4a0 would you like to open a PR to get https://codeberg.org/redbeard/forgejo-mcp/commit/5dc4571230806e911e8d6b5b764f596d98f76098 inhere?
goern commented 2026-02-18 13:12:01 +00:00 (Migrated from codeberg.org)

Implemented in 4fea365

Actions support is now live on main.

Key decisions:

  • Upgraded forgejo-sdk to v2.2.1-pre (post-merge of PR #103 which landed yesterday) — no custom SDK fork needed
  • Used the SDK's DispatchRepoWorkflow, ListRepoActionRuns, GetRepoActionRun methods with the types from action.go

3 new MCP tools in operation/actions/:

Tool Description
dispatch_workflow Trigger a workflow run via workflow_dispatch event
list_workflow_runs List runs with filtering by status/event/SHA/run_number, with pagination
get_workflow_run Get full details of a specific run by ID

Ancillary changes:

  • Added 7 new params: Workflow, Inputs, Event, RunNumber, HeadSHA, RunID, Status
  • Added forgejo.GetBaseURL() helper
  • Fixed operation/pull/pull.go: EditPullRequestOption.Body is now *string in the new SDK
  • 11 tests using mock HTTP servers (following the existing httptest pattern)

Thanks @redbeard for the original patches and for getting the SDK PR merged upstream!

## Implemented in 4fea365 Actions support is now live on `main`. **Key decisions:** - Upgraded `forgejo-sdk` to `v2.2.1-pre` (post-merge of [PR #103](https://codeberg.org/mvdkleijn/forgejo-sdk/pulls/103) which landed yesterday) — no custom SDK fork needed - Used the SDK's `DispatchRepoWorkflow`, `ListRepoActionRuns`, `GetRepoActionRun` methods with the types from `action.go` **3 new MCP tools** in `operation/actions/`: | Tool | Description | |---|---| | `dispatch_workflow` | Trigger a workflow run via `workflow_dispatch` event | | `list_workflow_runs` | List runs with filtering by status/event/SHA/run_number, with pagination | | `get_workflow_run` | Get full details of a specific run by ID | **Ancillary changes:** - Added 7 new params: `Workflow`, `Inputs`, `Event`, `RunNumber`, `HeadSHA`, `RunID`, `Status` - Added `forgejo.GetBaseURL()` helper - Fixed `operation/pull/pull.go`: `EditPullRequestOption.Body` is now `*string` in the new SDK - 11 tests using mock HTTP servers (following the existing `httptest` pattern) Thanks @redbeard for the original patches and for getting the SDK PR merged upstream!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp#60
No description provided.