Skip to content

feat: accept refs filters as HTTP query parameters - #15

Merged
qiansc merged 1 commit into
mainfrom
feat/refs-http-query
Nov 8, 2026
Merged

qiansc merged 1 commit into
mainfrom
feat/refs-http-query

Conversation

@qiansc

@qiansc qiansc commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Background

GET /v1/repo/refs filters were rejected by the HTTP query-parameter allowlist (INVALID_QUERY_PARAMETERS); the MCP refs tool was unaffected. Resolving a branch name with characters the service does not accept still returned a message saying tags are unsupported.

Changes

  • internal/httpserver: the refs route also accepts kind/query/author/title/since/until/sort/first; other routes keep rejecting them, and repeated parameters are still rejected.
  • internal/service: the INVALID_REVISION message states what resolve accepts and what is rejected.
  • docs/interfaces.md: names with unsupported characters.

Risks

Only fixed parameter names on the refs route are added; values are still validated by the service.

Backward compatibility

No behavior change other than refs HTTP filters becoming usable; the error code is unchanged, only its message.

Testing

  • New TestRefsRouteAcceptsItsFilters: filters reach service validation, repeated and unknown parameters are rejected, other routes do not accept these names.
  • make check and the internal/httpserver, internal/service and internal/mcpserver tests pass.

🤖 Generated with Claude Code

GET /v1/repo/refs now accepts kind, query, author, title, since, until,
sort and first alongside repo and after; other routes keep rejecting them.
The INVALID_REVISION message names what resolve accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit e670b1c into main Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant