style: apply gofmt
Estate-wide consolidation pass. golangci-lint v2 default set enables NO formatter, so gofmt drift accumulated silently across the estate -- 8 repos were carrying it, this one included. Same hole that let two files rot in dma-cli until they were found by hand (dma-cli#12). Mechanical and deterministic: `gofmt -w`, nothing hand-edited. Verified before commit -- gofmt -l now reports 0, go build and go vet both pass. Clears this repo to adopt the canonical .golangci.yml (infra ci-templates/golangci.yml, infra#309 pattern) in a later wave.
This commit is contained in:
@@ -27,8 +27,8 @@ func TestEmptyPathSegmentRejectedBeforeNetwork(t *testing.T) {
|
|||||||
c := gitea.NewClient(srv.URL, "tok")
|
c := gitea.NewClient(srv.URL, "tok")
|
||||||
|
|
||||||
paths := []string{
|
paths := []string{
|
||||||
"/api/v1/repos/mathias//issues", // empty repo
|
"/api/v1/repos/mathias//issues", // empty repo
|
||||||
"/api/v1/repos//gitea-mcp/contents/", // empty owner
|
"/api/v1/repos//gitea-mcp/contents/", // empty owner
|
||||||
"/api/v1/repos/mathias//issues?state=open", // empty repo before query
|
"/api/v1/repos/mathias//issues?state=open", // empty repo before query
|
||||||
}
|
}
|
||||||
for _, p := range paths {
|
for _, p := range paths {
|
||||||
|
|||||||
@@ -255,4 +255,3 @@ func (c *Client) GetRepo(ctx context.Context, owner, name string) (*Repo, error)
|
|||||||
}
|
}
|
||||||
return &r, nil
|
return &r, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ func TestCreateRepo_Org(t *testing.T) {
|
|||||||
|
|
||||||
c := gitea.NewClient(srv.URL, "tok")
|
c := gitea.NewClient(srv.URL, "tok")
|
||||||
r, err := c.CreateRepo(context.Background(), gitea.CreateRepoArgs{
|
r, err := c.CreateRepo(context.Background(), gitea.CreateRepoArgs{
|
||||||
Name: "infra",
|
Name: "infra",
|
||||||
Org: "hyperguild",
|
Org: "hyperguild",
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, "hyperguild/infra", r.FullName)
|
assert.Equal(t, "hyperguild/infra", r.FullName)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ProtocolVersion = "2025-03-26"
|
ProtocolVersion = "2025-03-26"
|
||||||
maxRequestBodyBytes = 1 << 20 // 1 MiB
|
maxRequestBodyBytes = 1 << 20 // 1 MiB
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const (
|
|||||||
|
|
||||||
func (t *TBDShip) Descriptor() registry.ToolDescriptor {
|
func (t *TBDShip) Descriptor() registry.ToolDescriptor {
|
||||||
return registry.ToolDescriptor{
|
return registry.ToolDescriptor{
|
||||||
Name: "tbd_ship",
|
Name: "tbd_ship",
|
||||||
Description: "Trunk-based ship of a single-file change: branch from base, write the file, open a PR, and auto-merge (squash) to base ONLY when the head commit's CI is fully green. Fails closed to PR-only (never merges) when CI is pending, red, or absent, when the base branch requires reviews, or when the merge isn't clean — returning the PR for manual handling with a reason. Set ci_timeout_seconds to poll CI to completion (default 0 = snapshot, which returns pending right after opening the PR). Returns {merged, pr_url, pr_number, ci_status, reason, branch}.",
|
Description: "Trunk-based ship of a single-file change: branch from base, write the file, open a PR, and auto-merge (squash) to base ONLY when the head commit's CI is fully green. Fails closed to PR-only (never merges) when CI is pending, red, or absent, when the base branch requires reviews, or when the merge isn't clean — returning the PR for manual handling with a reason. Set ci_timeout_seconds to poll CI to completion (default 0 = snapshot, which returns pending right after opening the PR). Returns {merged, pr_url, pr_number, ci_status, reason, branch}.",
|
||||||
InputSchema: json.RawMessage(`{
|
InputSchema: json.RawMessage(`{
|
||||||
"type":"object",
|
"type":"object",
|
||||||
|
|||||||
@@ -52,11 +52,11 @@ func TestWorkflowRunListTool(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "status=all is no-op",
|
name: "status=all is no-op",
|
||||||
input: `{"owner":"mathias","name":"gitea-mcp","status":"all"}`,
|
input: `{"owner":"mathias","name":"gitea-mcp","status":"all"}`,
|
||||||
notQuery: []string{"status"},
|
notQuery: []string{"status"},
|
||||||
respBody: `{"total_count":0,"workflow_runs":[]}`,
|
respBody: `{"total_count":0,"workflow_runs":[]}`,
|
||||||
assert: func(t *testing.T, out string) {},
|
assert: func(t *testing.T, out string) {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "branch filter",
|
name: "branch filter",
|
||||||
|
|||||||
Reference in New Issue
Block a user