Skip to content

Commit 32e0afa

Browse files
committed
add toolsnaps for ListReleases, GetLatestRelease
1 parent 62de985 commit 32e0afa

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get latest release"
5+
},
6+
"description": "Get the latest release in a GitHub repository",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
13+
"properties": {
14+
"owner": {
15+
"type": "string",
16+
"description": "Repository owner"
17+
},
18+
"repo": {
19+
"type": "string",
20+
"description": "Repository name"
21+
}
22+
}
23+
},
24+
"name": "get_latest_release"
25+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List releases"
5+
},
6+
"description": "List releases in a GitHub repository",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
13+
"properties": {
14+
"owner": {
15+
"type": "string",
16+
"description": "Repository owner"
17+
},
18+
"page": {
19+
"type": "number",
20+
"description": "Page number for pagination (min 1)",
21+
"minimum": 1
22+
},
23+
"perPage": {
24+
"type": "number",
25+
"description": "Results per page for pagination (min 1, max 100)",
26+
"minimum": 1,
27+
"maximum": 100
28+
},
29+
"repo": {
30+
"type": "string",
31+
"description": "Repository name"
32+
}
33+
}
34+
},
35+
"name": "list_releases"
36+
}

pkg/github/repositories_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,7 @@ func Test_GetTag(t *testing.T) {
22692269
func Test_ListReleases(t *testing.T) {
22702270
mockClient := github.NewClient(nil)
22712271
tool, _ := ListReleases(stubGetClientFn(mockClient), translations.NullTranslationHelper)
2272+
require.NoError(t, toolsnaps.Test(tool.Name, tool))
22722273

22732274
schema, ok := tool.InputSchema.(*jsonschema.Schema)
22742275
require.True(t, ok, "InputSchema should be *jsonschema.Schema")
@@ -2363,6 +2364,7 @@ func Test_ListReleases(t *testing.T) {
23632364
func Test_GetLatestRelease(t *testing.T) {
23642365
mockClient := github.NewClient(nil)
23652366
tool, _ := GetLatestRelease(stubGetClientFn(mockClient), translations.NullTranslationHelper)
2367+
require.NoError(t, toolsnaps.Test(tool.Name, tool))
23662368

23672369
schema, ok := tool.InputSchema.(*jsonschema.Schema)
23682370
require.True(t, ok, "InputSchema should be *jsonschema.Schema")

0 commit comments

Comments
 (0)