diff --git a/go.mod b/go.mod index 43e0dffc..08f1472c 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.9.1 github.com/spf13/viper v1.19.0 + github.com/aws/smithy-go v1.22.3 ) require ( diff --git a/go.sum b/go.sum index e57ff4af..42c7171f 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= +github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index c8bf01dc..37e07597 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -6,6 +6,7 @@ import ( "fmt" "io" + "github.com/aws/smithy-go/ptr" "github.com/google/go-github/v69/github" "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" @@ -125,14 +126,14 @@ func createOrUpdateFile(client *github.Client) (tool mcp.Tool, handler server.To // Create the file options opts := &github.RepositoryContentFileOptions{ - Message: github.String(message), + Message: ptr.String(message), Content: contentBytes, - Branch: github.String(branch), + Branch: ptr.String(branch), } // If SHA is provided, set it (for updates) if sha, ok := request.Params.Arguments["sha"].(string); ok && sha != "" { - opts.SHA = github.String(sha) + opts.SHA = ptr.String(sha) } // Create or update the file