feat: ✨ add 14 MCP tools for Forgejo releases and release attachments #134
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp!134
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/134/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #127
What
Adds
operation/release/— a new MCP tool domain covering the full Forgejo release surface:list_releases,get_release_by_id,get_release_by_tag,get_latest_releasecreate_release,edit_release,delete_release,delete_release_by_taglist_release_attachments,get_release_attachment,download_release_attachmentcreate_release_attachment,edit_release_attachment,delete_release_attachmentKey design decisions
forgejo.Client()directly — no raw HTTP fallback needed (unlikeoperation/attachment/, where the SDK gap forced raw HTTP).list_releasesstate filter (all|draft|prerelease|published): applied client-side after the SDK call. Forgejo's API has nostatequery param; the tool description documents that result size may be smaller thanlimiton any given page.list_release_attachmentspagination: the SDK returns a full slice; the tool slices client-side[offset:offset+limit]. Trade-off documented in the tool description.download_release_attachment: reusesforgejo.MaxInlineDownloadBytes(1 MiB) and theBlobResourceContentsinline shape fromoperation/attachment/, so the over/under-cap contract is identical across all attachment domains.edit_releasepartial update:EditReleaseOption.IsDraft/IsPrereleaseare*bool— omitting them marshals to JSON null, leaving Forgejo's existing values intact. Only fields the caller supplies are sent.create_releasename default: the SDK'sCreateReleaseOption.Validate()rejects an emptyTitle. If the caller omitsname, the tool defaults it totag_nameso callers can omit name without tripping the validator.Tests
19 unit tests in
operation/release/release_test.gousing thehttptest+SetClientForTestingpattern fromoperation/issue/:state=publishedfilter excludes drafts and prereleasesget_release_by_idnot-found pathcreate_releasewithtarget_commitishin PATCH bodyedit_releasepartial update —draftnot sent when caller omits itdelete_release+delete_release_by_tagsuccesscreate_release_attachmentbase64 decode guard (SDK not called)create_release_attachmentmultipart round-triplist_release_attachmentspage boundary + empty pagedownload_release_attachmentunder-cap inline, at-cap metadata-only, unknown-id errorOutput bounding checklist (docs/design/output-bounding.md)
list_releases: client-controlledpage+limit→ SDKListOptions; state filter documented as post-paginationlist_release_attachments: client-controlledpage+limit; full-fetch + client-side slice documented in tool descriptionVerification
make build✓make vendorno-op ✓openspec validate add-releases-support✓go test ./...all green ✓./forgejo-mcp --cli listshowsRELEASE:group with all 14 tools ✓codeberg.org/goern/forgejo-mcp:list_releases→get_latest_release→get_release_by_tag→list_release_attachments→download_release_attachment(over-cap path) ✓Documentation
README.md: Releases row group added to tools table (14 tools)DEVELOPER.md:operation/release/added to domain directory tabledemos/release-management.md: full showboat demo with real Codeberg output for the read path + write-tool parameter surface + autonomous release-notes workflowdemos/README.md: new §3 Releases section; sections renumbered 4–8op1st Pipelines as Code/code-scans-ftzml is running.
Starting Pipelinerun code-scans-ftzml in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines code-scans-ftzml -fop1st Pipelines as Code/openspec-validate-pr-wcw49 is running.
Starting Pipelinerun openspec-validate-pr-wcw49 in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines openspec-validate-pr-wcw49 -fop1st Pipelines as Code/on-pull-request- has failed.
There was an error creating the PipelineRun: on-pull-request-
cannot use the API on the provider platform to create a in_progress status:
op1st Pipelines as Code/code-scans-ftzml has successfully validated your commit.
Task Statuses:
fetch-source
gitleaks-version
gitleaks
op1st Pipelines as Code/openspec-validate-pr-wcw49 has successfully validated your commit.
Task Statuses:
fetch-source
validate