feat: workflow_run_list tool #29
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
workflow_run_statusexists but requires an explicitrun_id. There is no way to list recent workflow runs via the MCP — to even get an ID, the caller has to either remember it or fall back to the gitea REST API with a token scoped forread:repository.Concrete blocker hit 2026-05-17 watching the CD for commit
11f86f5(issue #27 rollout): the connector could confirm "run #338 = success" only by guessing the ID (prior run was #336, mental arithmetic for +2 commits). On a busy day with parallel CI for branch + tag + commit fan-out, that arithmetic stops working.Same shape as #28 (
issue_list) — every*_get(id)tool wants a*_list()partner.Gitea API
Query params worth surfacing:
event—push|pull_request|schedule|workflow_dispatch(filter by trigger)status—queued|in_progress|completedactor— usernamebranch— branch name (e.g.main)head_sha— commit SHA, full or short (the killer-feature param for the use case above)workflow— workflow file name (e.g.cd.yml)page/limit— pagination (cap at 50, same asrepo_list)Tool spec
Defaults tuned for the most common "what just happened" query:
limit=10, all events, all statuses, no branch filter. Most callers will passhead_shato pin to one commit.Acceptance criteria
workflow_run_listregistered incmd/gitea-mcp/main.gohead_shafilter accepts both short (7-char) and full SHAs — short is the natural form callers already have fromgit logcapLimithelperinternal/tools/workflow_run_list_test.go: happy path, empty result, allowlist rejection, status filter, head_sha filter (short + full), branch filterListWorkflowRuns(ctx, owner, name, args)ininternal/gitea/workflows.gotask checkgreenOut of scope
workflow_run_logstoolworkflow_run_jobstoolworkflow_run_canceltoolRelated