feat: add list_org_labels + merge org labels in list_repo_labels (closes #125) #130
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!130
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/130/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?
Summary
Implements the
add-org-label-supportOpenSpec change (already authored onissues/125, cherry-picked into this branch as commit7b73057).Closes #125 — reporter wanted org-level labels visible to the MCP server so the model doesn't need to make two requests to discover usable label IDs.
What
list_org_labels(org, page, limit)— fetches/orgs/{org}/labelsviapkg/forgejo.DoJSONList. No SDK upgrade required.list_repo_labelsaugmented — new optionalinclude_org_labelsboolean (defaulttrue). When the owner is an org, the handler merges/orgs/{owner}/labelsinto the response.ScopedLabelwrapper embeds*forgejo_sdk.Labeland adds ascopefield ("repo"|"org") so callers can disambiguate ID spaces in merged responses.Behavior
list_org_labelson existing orgscope: "org"list_org_labelson missing orgDoJSONList)list_org_labelswith 401/403forgejo.ErrUnauthorizedlist_repo_labelson org-owned reposcopelist_repo_labelson user-owned repolist_repo_labelswithinclude_org_labels=falseTests
operation/issue/issue_test.goadds 6 tests vianewLabelsBackendhelper:TestListOrgLabels_SuccessTestListOrgLabels_404IsEmptyTestListOrgLabels_UnauthorizedSurfacesTestListRepoLabels_MergeWithOrgLabelsTestListRepoLabels_IncludeOrgFalseSkipsOrgCallTestListRepoLabels_UserOwnerOrgEndpoint404go test ./...all green.make buildgreen.Test plan
go test ./...passes locallymake buildpasses locallyopenspec validate add-org-label-support --strictpasseslist_org_labelsreturns expected labels;list_repo_labelsincludes them withscope: "org"list_repo_labelsreturns repo labels only (no error from 404 on org endpoint)Closes #125.
op1st Pipelines as Code/on-pull-request-ql465 is running.
Starting Pipelinerun on-pull-request-ql465 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 on-pull-request-ql465 -fop1st Pipelines as Code/openspec-validate-pr-kjjqd is running.
Starting Pipelinerun openspec-validate-pr-kjjqd 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-kjjqd -fop1st Pipelines as Code/openspec-validate-pr-kjjqd has successfully validated your commit.
Task Statuses:
fetch-source
validate
op1st Pipelines as Code/on-pull-request-ql465 has successfully validated your commit.
Task Statuses:
fetch-source
build-and-test