MCPcopy
hub / github.com/sourcegraph/checkup / repositoryContent

Function repositoryContent

storage/github/github_test.go:58–68  ·  view source on GitHub ↗
(path, serverSHAForRepo string, data interface{})

Source from the content-addressed store, hash-verified

56}
57
58func repositoryContent(path, serverSHAForRepo string, data interface{}) *github.RepositoryContent {
59 return &github.RepositoryContent{
60 Type: github.String("file"),
61 Encoding: github.String("base64"),
62 Size: github.Int(len(base64Encoded(toJSON(data)))),
63 Name: github.String(filepath.Base(path)),
64 Path: github.String(path),
65 Content: github.String(base64Encoded(toJSON(data))),
66 SHA: github.String(serverSHAForRepo),
67 }
68}
69
70func withGitHubServer(t *testing.T, specimen Storage, f func(*github.Client)) {
71 // test server

Callers 1

withGitHubServerFunction · 0.85

Calls 3

base64EncodedFunction · 0.85
toJSONFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected