Skip to content

Commit 0765059

Browse files
committed
Bump version to 0.1.2 and add user-agent header
Signed-off-by: edmondfrank
1 parent 8229e9d commit 0765059

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
GO = go
33

44
# Version information
5-
VERSION ?= 0.1.1
5+
VERSION ?= 0.1.2
66

77
# Repository information
88
GITEE_OWNER ?= "oschina"

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import (
1717
)
1818

1919
var (
20-
// Version gitee mcp server version
21-
Version = "0.1.1"
20+
Version = utils.Version
2221
)
2322

2423
func newMCPServer() *server.MCPServer {

utils/constants.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package utils
2+
3+
var (
4+
// Version gitee mcp server version
5+
Version = "0.1.2"
6+
)

utils/gitee_client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"net/http"
1111
"net/url"
1212
"os"
13+
"runtime"
1314
"strconv"
1415

1516
"github.com/mark3labs/mcp-go/mcp"
@@ -137,6 +138,7 @@ func (g *GiteeClient) Do() (*GiteeClient, error) {
137138
}
138139

139140
req.Header.Set("Content-Type", "application/json")
141+
req.Header.Set("User-Agent", "mcp-gitee " + Version + " Go/" + runtime.GOOS + "/" + runtime.GOARCH + "/" + runtime.Version())
140142

141143
accessToken := GetGiteeAccessToken()
142144
if accessToken == "" {

0 commit comments

Comments
 (0)