MCPcopy
hub / github.com/github/github-mcp-server / GetRawContent

Method GetRawContent

pkg/raw/raw.go:65–73  ·  view source on GitHub ↗

GetRawContent fetches the raw content of a file from a GitHub repository.

(ctx context.Context, owner, repo, path string, opts *ContentOpts)

Source from the content-addressed store, hash-verified

63
64// GetRawContent fetches the raw content of a file from a GitHub repository.
65func (c *Client) GetRawContent(ctx context.Context, owner, repo, path string, opts *ContentOpts) (*http.Response, error) {
66 url := c.URLFromOpts(opts, owner, repo, path)
67 req, err := c.newRequest(ctx, "GET", url, nil)
68 if err != nil {
69 return nil, err
70 }
71
72 return c.client.Client().Do(req)
73}

Callers 2

TestGetRawContentFunction · 0.95

Calls 2

URLFromOptsMethod · 0.95
newRequestMethod · 0.95

Tested by 1

TestGetRawContentFunction · 0.76