MCPcopy Create free account
hub / github.com/atripati/ark / getUser

Method getUser

pkg/tools/github.go:263–278  ·  view source on GitHub ↗
(params map[string]interface{})

Source from the content-addressed store, hash-verified

261}
262
263func (g *githubTools) getUser(params map[string]interface{}) (string, error) {
264 if g.token == "" {
265 return "", fmt.Errorf("github_get_user: GITHUB_TOKEN required")
266 }
267
268 result, err := g.exec.Execute(HTTPToolConfig{
269 Method: "GET",
270 URL: githubAPI + "/user",
271 Headers: g.headers(),
272 }, nil)
273 if err != nil {
274 return "", fmt.Errorf("github_get_user: %w", err)
275 }
276
277 return simplifyUser(result)
278}
279
280func (g *githubTools) searchRepos(params map[string]interface{}) (string, error) {
281 query, _ := params["query"].(string)

Callers

nothing calls this directly

Calls 3

headersMethod · 0.95
simplifyUserFunction · 0.85
ExecuteMethod · 0.65

Tested by

no test coverage detected